[R] (no subject)

Jan Wiener jan.wiener at tuebingen.mpg.de
Thu Dec 5 13:12:03 CET 2002


hi, 
suppose you have a for-loop like this: 

for(i in1:x) {} ...

now you want to generate a variable in every
cycle (since you do not know the size of x in
beforehand you have to do this dynamically). 

the variable should e.g. look like this:
variableName1<-c() (if x==1) 
variableName2<-c() (ifx==2) 
variableName3<-c() (if x==3) 
.. 
.. 
i tried this(which obviously didn't work):

paste("variableName",x,sep="")<-c(2,3,4) 

so i need
something similiar to this (but working!)!

thanks for help, greetinx jan




More information about the R-help mailing list