How can I determine whT OS I am running under? if WINDOWS do this if LINUX do that
Omar Lakkis wrote:> How can I determine whT OS I am running under? > > if WINDOWS do this > if LINUX do that >Hi, Omar, Look at version$os. > # windows > version$os [1] "mingw32" > # linux > version$os [1] "linux-gnu" HTH, --sundar
?.Platform -- Bert Gunter Genentech Non-Clinical Statistics South San Francisco, CA "The business of the statistician is to catalyze the scientific learning process." - George E. P. Box> -----Original Message----- > From: r-help-bounces at stat.math.ethz.ch > [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Omar Lakkis > Sent: Tuesday, September 13, 2005 11:30 AM > To: r-help at stat.math.ethz.ch > Subject: [R] what OS > > How can I determine whT OS I am running under? > > if WINDOWS do this > if LINUX do that > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html >
Try this Sys.info()["sysname"] Etienne ----- Original Message ----- From: "Omar Lakkis" <uofiowa at gmail.com> To: <r-help at stat.math.ethz.ch> Sent: Tuesday, September 13, 2005 8:29 PM Subject: [R] what OS> How can I determine whT OS I am running under? > > if WINDOWS do this > if LINUX do that > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide!http://www.R-project.org/posting-guide.html> > > > -- > No virus found in this incoming message. > Checked by AVG Anti-Virus. > Version: 7.0.344 / Virus Database: 267.10.23/99 - Release Date: 12/09/2005 > >-- No virus found in this outgoing message. Checked by AVG Anti-Virus.
.Platform$OS.type> -----Original Message----- > From: r-help-bounces at stat.math.ethz.ch > [mailto:r-help-bounces at stat.math.ethz.ch]On Behalf Of Omar Lakkis > Sent: Tuesday, September 13, 2005 11:30 AM > To: r-help at stat.math.ethz.ch > Subject: [R] what OS > > > How can I determine whT OS I am running under? > > if WINDOWS do this > if LINUX do that > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html >
.Platform contains this and more. Reid Huntsinger -----Original Message----- From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Omar Lakkis Sent: Tuesday, September 13, 2005 2:30 PM To: r-help at stat.math.ethz.ch Subject: [R] what OS How can I determine whT OS I am running under? if WINDOWS do this if LINUX do that ______________________________________________ R-help at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
> From: Sundar Dorai-Raj > > Omar Lakkis wrote: > > How can I determine whT OS I am running under? > > > > if WINDOWS do this > > if LINUX do that > > > > Hi, Omar, > > Look at version$os. > > > # windows > > version$os > [1] "mingw32" > > > # linux > > version$os > [1] "linux-gnu"Or see ?.Platform. Andy> HTH, > > --sundar > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html > > >
Liaw, Andy wrote:>>From: Sundar Dorai-Raj >> >>Omar Lakkis wrote: >> >>>How can I determine whT OS I am running under? >>> >>>if WINDOWS do this >>>if LINUX do that >>> >> >>Hi, Omar, >> >>Look at version$os. >> >> > # windows >> > version$os >>[1] "mingw32" >> >> > # linux >> > version$os >>[1] "linux-gnu" > > > Or see ?.Platform.Yes, please follow Andy and use .Platform, and in particular nothing else for programming! It is *not* guaranteed that on Windows version$os == "mingw32". Uwe Ligges> Andy > > > >>HTH, >> >>--sundar >> >>______________________________________________ >>R-help at stat.math.ethz.ch mailing list >>https://stat.ethz.ch/mailman/listinfo/r-help >>PLEASE do read the posting guide! >>http://www.R-project.org/posting-guide.html >> >> >> > > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html