[R] how to generate object name automatically?

Liaw, Andy andy_liaw at merck.com
Fri May 13 18:14:50 CEST 2005


The obvious way is to use assign().  The possibly better way is to store the
objects in a list.

Andy

> From: Xiao Shi
> 
> Hi everybody,
> I have a lable vector ,
> raw.labs= paste("file1", 1:20, sep = "")
> And i can i make the content of raw.labs to be a object name.
> eg ,file1=123(use some function on raw.labs to generate the 
> name file1)
> Thanks!
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html
> 
> 
>




More information about the R-help mailing list