how to create many variables at one time?
Hi Manli,
you may consider structuring your data in some appropriate form like
data.frame or list. Its often not the best way holding information
separated in many variables.
But if you *really* want to create 100 separate variables, something like
for (i in 1:100) assign(paste("X",i,sep=""), some_values)
will do the job.
Manli Yan schrieb:
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.
Eik Vettorazzi Institut f?r Medizinische Biometrie und Epidemiologie Universit?tsklinikum Hamburg-Eppendorf Martinistr. 52 20246 Hamburg T ++49/40/42803-8243 F ++49/40/42803-7790