Prof Brian Ripley wrote:
>
> But the request was for a *generic* solution. On Windows there
> might not be anything corresponding to a home directory
> (and the rw-FAQ discusses the concept and how R resolves this).
>
> The best answer I know of is path.expand("~").
>
Thanks, this is the only solution that works for Windows XP,
and it will probably work for Linux.
Also, in Windows, there are variables homedrive and homepath,
that I could combine to form the path (probably this is what
path.expand does :-))
Sys.getenv("homepath")
Sys.getenv("homedrive")
Alberto Monteiro
______________________________________________
[email protected] 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.