You can use this:
Sys.getenv("PROGRAMFILES")
or
shell("echo %PROGRAMFILES%")
shell("echo %PROGRAMFILES%", inter = T)
On Tue, Sep 2, 2008 at 9:56 AM, Kjell Konis <kjell.konis@epfl.ch> wrote:
> Hello,
>
> I want to use the %ProgramFiles% variable in a Sys.setenv (R 2.7.2,
> Windows) but it always seems to get handled literally. For instance, in
> cmd.exe I get what I want
>
>
> C:\Documents and Settings\user>echo %ProgramFiles%
> C:\Program Files
>
>
> but in R
>
>
> > system("echo %ProgramFiles%")
> %ProgramFiles%
>
>
> nope. Is there a way to use %ProgramFIles% or get the corresponding path?
>
> Thanks,
> Kjell
>
> ______________________________________________
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
--
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O
[[alternative HTML version deleted]]