[R] List of varying length suitable for use as dimnames

jim holtman jholtman at gmail.com
Sat Sep 27 21:05:56 CEST 2008


It is easy enough to create the list, the real question is what do you
want in it ( provide commented, minimal, self-contained, reproducible
code).  Here is the list:

> x <- vector('list', 10)
> names(x) <- paste("SS", 1:10, sep='')
> x
$SS1
NULL

$SS2
NULL

$SS3
NULL

$SS4
NULL

$SS5
NULL

$SS6
NULL

$SS7
NULL

$SS8
NULL

$SS9
NULL

$SS10
NULL

>


On Sat, Sep 27, 2008 at 1:52 PM, John Sorkin
<jsorkin at grecc.umaryland.edu> wrote:
> Windows XP
> R 2.7.2
>
> I would like to create a list of varying length (length n) suitable for use as dimnames for a matrix whose size will vary, i.e.
>
> SS1 SS2 SS3 . . . SSn
>
> Ansy suggestions for accomplishing this would be appreciated.
> Thanks,
> John
>
> John Sorkin M.D., Ph.D.
> Chief, Biostatistics and Informatics
> Baltimore VA Medical Center GRECC,
> University of Maryland School of Medicine Claude D. Pepper OAIC,
> University of Maryland Clinical Nutrition Research Unit, and
> Baltimore VA Center Stroke of Excellence
>
> University of Maryland School of Medicine
> Division of Gerontology
> Baltimore VA Medical Center
> 10 North Greene Street
> GRECC (BT/18/GR)
> Baltimore, MD 21201-1524
>
> (Phone) 410-605-7119
> (Fax) 410-605-7913 (Please call phone number above prior to faxing)
> jsorkin at grecc.umaryland.edu
> Confidentiality Statement:
> This email message, including any attachments, is for ...{{dropped:18}}



More information about the R-help mailing list