Many thanks, much appreciated.
"Henrique Dallazuanna" <[EMAIL PROTECTED]>
18/07/2008 15:11
To
[EMAIL PROTECTED]
cc
r-help@r-project.org
Subject
Re: [R] creating names for lists
Try:
foo <- list(3)
names(foo) <- paste(a, b)
On Fri, Jul 18, 2008 at 11:03 AM, <
Try:
foo <- list(3)
names(foo) <- paste(a, b)
On Fri, Jul 18, 2008 at 11:03 AM, <[EMAIL PROTECTED]> wrote:
> Dear R Users,
> How can I create names for lists within a function where the name itself
> is a function of several variables ?
>
>> a<-1
>> b<-2
>> paste(a,b)
> [1] "1 2"
>> foo<-list(pa
Dear R Users,
How can I create names for lists within a function where the name itself
is a function of several variables ?
> a<-1
> b<-2
> paste(a,b)
[1] "1 2"
> foo<-list(paste(a,b)=3) <<<= DOES NOT WORK
Error: unexpected '=' in "foo<-list(paste(a,b)="
> eval(paste(a,b))
[1] "1 2"
> foo<-li
3 matches
Mail list logo