Hello, I get a value which stores a relative file name. (I get it from another function, which I don't want to change.) e.g.> fileName <- "../data/2010-08.csv";Is it possible to get the absolute file path out of this value? (e.g. /home/sebastian/documents/data/2010-08.csv) Kind regards, Sebastian
Le 26/09/10 10:00, Sebastian Gibb a ?crit :> > Hello, > > I get a value which stores a relative file name. (I get it from another > function, which I don't want to change.) > e.g. >> fileName<- "../data/2010-08.csv"; > > Is it possible to get the absolute file path out of this value? > (e.g. /home/sebastian/documents/data/2010-08.csv) > > Kind regards, > > SebastianHi, I often use tools:::file_path_as_absolute which is not exported from the tools namespace, but does the job. Romain -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://bit.ly/cCmbgg : Rcpp 0.8.6 |- http://bit.ly/bzoWrs : Rcpp svn revision 2000 `- http://bit.ly/b8VNE2 : Rcpp at LondonR, oct 5th
The package R.utils has a function to get absolutepath On Sun, Sep 26, 2010 at 1:00 AM, Sebastian Gibb <lists@sebastiangibb.de>wrote:> Hello, > > I get a value which stores a relative file name. (I get it from another > function, which I don't want to change.) > e.g. > > fileName <- "../data/2010-08.csv"; > > Is it possible to get the absolute file path out of this value? > (e.g. /home/sebastian/documents/data/2010-08.csv) > > Kind regards, > > Sebastian > > ______________________________________________ > R-help@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. >[[alternative HTML version deleted]]