[R] Substitute list value

R. Michael Weylandt <michael.weylandt@gmail.com> michael.weylandt at gmail.com
Wed Jul 11 23:56:34 CEST 2012


It should. Reproducible example of it not?

Michael

On Jul 11, 2012, at 3:06 PM, Charles Stangor <cstangor at gmail.com> wrote:

> I can't seem to determine how to get the name of a list member to
> substitute as a variable name:
> 
> ll <- list("a1" = "a","a2" = "b")
> 
> t1[t==ll[1], "v"] <- 99
> 
> why doesn't this substitute to:
> 
> t1[t=="a", "v"] <- 99
> 
> Thank you!
> 
> 
> 
> 
> -- 
> Charles Stangor
> Professor
> 
> 
> 
> -- 
> Charles Stangor
> Professor
> 
>    [[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list