r - change object name in loop inR -
i have loop reads in different rdata file in each iteration , works paste. however, once rdata file loaded there object loaded called topy in first instance of loop, in second ropy, eopy , on. tried is
vals<-c("topy","ropy","eopy") paste("vals[i]")->r
to assign these different objects r used further in script , overwirtten in every step of loop. not work. topy , ropy , rest ar matrixes. when load rdata file , type manually topy matrix shown if paste , type r show "topy". tried assign - did not work..any idea?
i'm not sure whether got point, following need?
p <-parse(text=vals[i]) r <- eval(p)
Comments
Post a Comment