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