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

From: moleps <moleps2_at_gmail.com>
Date: Sun, 06 Jun 2010 21:51:11 +0200


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



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. Received on Mon 07 Jun 2010 - 00:25:21 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 07 Jun 2010 - 20:50:28 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive