Hi RSVP,
On Tue, Mar 22, 2011 at 4:47 PM, RSVP wrote:
> I have a list.
>
> my.list <- list(Tom=c(1,2,3), Dick=c(4,5,6), Harry=c(7,8,9))
>
> I assign one of the names of the list to a variable.
>
> name <- "Harry"
>
> I can access the value of the list using the variable as follows:
>
> eval(pars
I have a list.
my.list <- list(Tom=c(1,2,3), Dick=c(4,5,6), Harry=c(7,8,9))
I assign one of the names of the list to a variable.
name <- "Harry"
I can access the value of the list using the variable as follows:
eval(parse(text=paste("my.list$", name, sep="")))
[1] 7 8 9
But how do I change
2 matches
Mail list logo