[R] how to create many variables at one time?

jim holtman jholtman at gmail.com
Wed Mar 4 22:51:44 CET 2009


Have you considered using a 'list'? much easier to manage than a lot
of individual objects.

mylist <- lapply(1:100, runif)


On Wed, Mar 4, 2009 at 4:34 PM, Manli Yan <manliyanrhelp at gmail.com> wrote:
>  Hi:
>  I need to create many variables at one time,how to do this in R?
>  for eg ,X1,X2.......X100?
>
>  Thanks~
>
>        [[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.
>



-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem that you are trying to solve?




More information about the R-help mailing list