Hi,
see ?R.version
Something like
if(version$os == "mingw32") {
path = "/ABC"} else {
path = "/DEF"
}
might do it, but I'm not sure exactly what possible values version$os
can take or what determines the value exactly.
Best,
Ista
On Fri, Feb 25, 2011 at 1:23 PM, Hui Du <[email protected]> wrote:
> Hi All,
>
> I have two Rs, one has been installed in Windows system and
> another one has been installed under UNIX system. Is there any environmental
> variable or function to tell me which R I am using? The reason that I need to
> know it is under different system, the data path could be different. I want
> to do something like
>
> if it is R under Windows
>
> path = "/ABC"
> else if it is R under UNIX,
> path = "/DEF"
>
> Any idea? Thanks.
>
> Best Regards,
>
> HXD
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> [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.
>
--
Ista Zahn
Graduate student
University of Rochester
Department of Clinical and Social Psychology
http://yourpsyche.org
______________________________________________
[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.