[R] Get "home" directory and simple I/O

Gabor Grothendieck ggrothendieck at gmail.com
Fri Mar 23 15:41:15 CET 2007


On 3/23/07, Liaw, Andy <andy_liaw at merck.com> wrote:
> From: Gabor Grothendieck
> >
> > See:
> >
> > ?R.home
>
> That's not what Alberto wanted:  It gives the location of the R
> installation, not where user's home directory is.  AFAIK Windows does
> not set the HOME environment variable by default.

ok.  Try this, at least on Windows XP:

paste(Sys.getenv(c("HOMEDRIVE", "HOMEPATH")), collapse = "")



More information about the R-help mailing list