>>>>> "AR" == Arthur Roberts <[EMAIL PROTECTED]>
>>>>>     on Fri, 26 Sep 2008 01:54:59 -0700 writes:

    AR> Hi, all,
    AR> Is there an R-command that will convert shell("cd") to a string, so  
    AR> that I can use it in the paste() command?

I'm pretty sure that for the specific case, you should use  
    setwd() and or getwd() 
which work platform-independently.

For the general case, note that shell() is windows-only whereas
the similar (but different!) function  system() is defined for
all platforms and it has a second argument 'intern' which when
set to TRUE returns the result "R internally", i.e. as a
character, so the answer to your first question might be

 system("cd", intern=TRUE)

Martin

______________________________________________
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.

Reply via email to