[R] using paste and

Dirk Eddelbuettel edd at debian.org
Fri Aug 19 17:08:40 CEST 2005


roger bos <roger.bos <at> gmail.com> writes:
> Sometimes even the easy stuff is difficult (for me)... I want to get
> input from different places to paste together an excel filename (so

Have you considered 
  a) the file.path() function,
  b) the fact that forward slashes also work on Windoze?

Your first example, with an outer paste() for the suffix:

> paste(file.path("R:", "New Ranks", "SMC", "SMC", "20050819"), ".xls", sep="")
[1] "R:/New Ranks/SMC/SMC/20050819.xls"
> 

Hth, Dirk




More information about the R-help mailing list