[R] character vector as input to function?

Nicholas Lee N.J.Lee at statslab.cam.ac.uk
Wed Apr 14 16:15:51 CEST 1999


On Wed, 14 Apr 1999, Bill Simpson wrote:

> x<-scan("~/rstuff/data/"filename)
> #for example, if filename is a0.dat, it will scan("~/rstuff/data/a0.dat")  


Try:
> filename_c("a0.dat")
> paste("~/rstuff/data/", filename, sep="")
[1] "~/rstuff/data/a0.dat"
 
Nicholas


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list