Re: [R] creating names for lists

2008-07-18 Thread tolga . i . uzuner
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, <

Re: [R] creating names for lists

2008-07-18 Thread Henrique Dallazuanna
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

[R] creating names for lists

2008-07-18 Thread tolga . i . uzuner
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