Re: [R] building packages for Linux vs. Windows

From: Uwe Ligges <ligges_at_statistik.tu-dortmund.de>
Date: Sun, 10 Feb 2008 19:28:49 +0100

Duncan Murdoch wrote:
> On 10/02/2008 1:07 PM, Erin Hodgess wrote:

>> Hi R People:
>>
>> I sure that this is a really easy question, but here goes:
>>
>> I'm trying to build a package that will run on both Linux and Windows.
>>
>> However, there are several commands in a section that will be
>> different in Linux than they are in Windows.
>>
>> Would I be better off just to build two separate packages, please?
>> If just one is needed, how could I determine which system is running
>> in order to use the correct command, please?

>
> You will find it much easier to build just one package.
>
> You can use .Platform or (for more detail) Sys.info() to find out what
> kind of system you're running on. Remember that R doesn't just run on
> Linux and Windows: there's also MacOSX, and other Unix and Unix-like
> systems (Solaris, etc.).

Erin,

moreover, R has some nice facility that allows to write a function for Windows, another one for Mac and a thirs one for Unix-alikes and place them in subfolders of ./R with the right names, see the Writing R Extensions manual.

Uwe Ligges

> Duncan Murdoch
>
> ______________________________________________
> 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 Sun 10 Feb 2008 - 18:31:57 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 Sun 10 Feb 2008 - 19:30:13 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