Skip to content
Prev 7932 / 398503 Next

unix

I'd like to point out a potential confusion. Although the advice about
system() is technically correct, for the particular case of changing
directories you probably want to use getwd/setwd [I think system() spawns
its own shell, so changing directories with system() isn't persistent].  
For example:
[1] "/home/ben"
[1] "/home/ben"    ## I'm still in the same working directory
NULL
[1] "/home"

system("pwd") would do the same thing as getwd(), but is specific to Unix
(whereas getwd() should also work on Windows etc.)

  For my two cents, the "shorthand" command that I'd like to have in R
would be a shortcut for referring to .Last.value like %, %% in Maple ...
might be hard to find a special character that's not already used for
something, though.
On 6 Nov 2000, Peter Dalgaard BSA wrote: