Re: [R] how can I write code to detect whether the machine is Windows or Linux?

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Wed, 23 Jul 2008 21:13:23 -0400

Ryacas is one package that checks this. Look at this file:

http://ryacas.googlecode.com/svn/trunk/R/yacasInstall.R

On Wed, Jul 23, 2008 at 5:53 PM, Philip James Smith <philipsmith_at_alumni.albany.edu> wrote:
> Hi R-People:
>
> I use 2 machines: a machine with a Windows XP operating system, and another
> with a Linux Ubuntu OS. I transport my code between these 2 machines.
> However, pathnames to data files always need to be "adjusted" to account for
> the OS that I'm working on.
>
> Here is my question:
>
> How do I write code to detect whether I'm using the XP or the Linux machine?
>
> If I knew this, I could write my code in a way so that I didn't have to
> adjust path names to data file all the time.
>
> I checked the archives... didn't find anything, but perhaps didn't know the
> right search terms...
>
> Thanks for your help, R-community! Please respond to:
> philipsmith_at_alumni.albany.edu
>
> Best regards,
> Phil Smith
> Duluth, GA
>
> ______________________________________________
> R-help_at_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.
>



R-help_at_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. Received on Thu 24 Jul 2008 - 01:26:27 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 24 Jul 2008 - 02:32:25 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive