[R] changing directory (was system command)
Prof Brian D Ripley
ripley at stats.ox.ac.uk
Fri Aug 16 11:59:42 CEST 2002
On Fri, 16 Aug 2002, Nader Emami wrote:
> Hello,
>
> It is very simple question. I want to go to the parent directory and
> give the 'system("cd ../") commnad. But it stayes at the same dirctory
> as before. Do I forget to give some extra parameter to system command in
> this case?
That launches a shell, changes working directory in that shell, then quits.
setwd("..") should do what I guess you intended, change the working
directory of the R process itself.
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272860 (secr)
Oxford OX1 3TG, UK Fax: +44 1865 272595
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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