[R] How do I generate multiple (similar) objects within R?
ligges at statistik.tu-dortmund.de
Tue Nov 18 19:01:57 CET 2008
An, again FAQ "How can I turn a string into a variable?" ....
Nicklas Pettersson wrote:
> I wonder if anyone knows how to generate a list of objects, e.g. ten
> vectors with names: vect1, vect2, ... , vect10.
> My own idea was to use something like:
> for (i in 1:10)
> print(paste("vect", i,"<-NULL",sep=""))
> but the result is:
> and not
> as I would like. Does anyone know?
> R-help at r-project.org mailing list
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help