[R] paste together a string object later to be utilized in a function

moleps moleps2 at gmail.com
Sun Jun 6 21:51:11 CEST 2010


Dear r-listers,

I need to pass a string to a function. However the length of the string is dependent on the length of a vector. 


b<-length(h)
v<-paste("rep(names(ts$a[",1:b,"]),ts$a[",1:b,"])",sep="")


Is it possible somehow to pass this as an argument to a function later on ? 



Regards,

//M



More information about the R-help mailing list