Hi, I asked some days ago how to guess the o.s. the machine is running. I found that it is stored in a variable called R_PLATFORM. Now I need a full list of all the values this variable can have because I need to set an option depending on the endianness of the platform in which we are compiling the package. Anyone can help me? Thanks, Virgilio Gómez Rubio Dpto. Estadística e I. O. - Facultat de Matemàtiques Avda. Vicent A. Estellés, 1 - 46100 Burjassot Valencia - SPAIN TLF: 00 32 96 386 43 62 - FAX: 00 32 96 398 35 99 ---------- Forwarded message ---------- Date: Wed, 24 Jul 2002 10:24:14 +0200 (CEST) From: virgil@uv.es To: r-devel@lists.R-project.org Subject: Guessing o.s. during installation Hello, I would like to know how R can guess the operating system the machine is running during the installation of a package. Besides, if the o.s. is SUN I need to add an option to the compiling command (a define). Regards and thanks, VIrgilio -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Thu, 25 Jul 2002 16:15:31 +0200 (CEST), you wrote:>Hi, > >I asked some days ago how to guess the o.s. the machine is running. I >found that it is stored in a variable called R_PLATFORM. Now I need a >full list of all the values this variable can have because I need to set >an option depending on the endianness of the platform in which we are >compiling the package. > > Anyone can help me? Thanks,I don't think a complete list exists. I'd suggest running R to find out: Platform()$endian gives the result you need, so something like this works in Windows: echo cat(Platform()$endian) | Rterm --slave Duncan Murdoch -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
R_PLATFORM is used set in etc/Renviron. You can't find a complete list, as R can be compiled on new platforms. In any case, a user could change the value. The information you want is in the Rconfig.h header file, in /* #undef WORDS_BIGENDIAN */ which is uncommented on big-endian systems. This *is* documented in `Writing R Extensions'. From R code, look at .Platform$endian. On Thu, 25 Jul 2002 virgil@uv.es wrote:> Hi, > > I asked some days ago how to guess the o.s. the machine is running. I > found that it is stored in a variable called R_PLATFORM. Now I need a > full list of all the values this variable can have because I need to set > an option depending on the endianness of the platform in which we are > compiling the package. > > Anyone can help me? Thanks, > > Virgilio Gómez Rubio > > Dpto. Estadística e I. O. - Facultat de Matemàtiques > Avda. Vicent A. Estellés, 1 - 46100 Burjassot > Valencia - SPAIN > > TLF: 00 32 96 386 43 62 - FAX: 00 32 96 398 35 99 > > > ---------- Forwarded message ---------- > Date: Wed, 24 Jul 2002 10:24:14 +0200 (CEST) > From: virgil@uv.es > To: r-devel@lists.R-project.org > Subject: Guessing o.s. during installation > > Hello, > > I would like to know how R can guess the operating system the machine is > running during the installation of a package. Besides, if the o.s. is SUN > I need to add an option to the compiling command (a define). > > Regards and thanks, > > VIrgilio > > > > > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- > r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html > Send "info", "help", or "[un]subscribe" > (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._ >-- Brian D. Ripley, ripley@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Hello, I think the best option isd the one proposed by Mr. Ripley. We have added some C and the package compiles fine on Sun machines, and it should do on other Big Endian machines. Thanks to all for your comments, Virgilio Gómez Rubio Dpto. Estadística e I. O. - Facultat de Matemàtiques Avda. Vicent A. Estellés, 1 - 46100 Burjassot Valencia - SPAIN TLF: 00 32 96 386 43 62 - FAX: 00 32 96 398 35 99 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._