Does R have a function to obtain a name of the machine that it is running on? I'm going to be writing results to a database from several different machines, and I'd like to be able to identify where they came from. Duncan Murdoch
Not an R function, per se, but> system("uname -n", intern = TRUE)returns my computer's network node hostname on both Windows and Linux. You can use 'uname -a' for more information. -----Original Message----- From: Duncan Murdoch [mailto:murdoch at stats.uwo.ca] Sent: Friday, December 09, 2005 9:31 AM To: R-devel Subject: [Rd] ID for machine? Does R have a function to obtain a name of the machine that it is running on? I'm going to be writing results to a database from several different machines, and I'd like to be able to identify where they came from. Duncan Murdoch ______________________________________________ R-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
maybe Sys.info()["nodename"] could be helpfull in Windows. Best, Dimitris ---- Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium Tel: +32/(0)16/336899 Fax: +32/(0)16/337015 Web: http://www.med.kuleuven.be/biostat/ http://www.student.kuleuven.be/~m0390867/dimitris.htm ----- Original Message ----- From: "Duncan Murdoch" <murdoch at stats.uwo.ca> To: "R-devel" <r-devel at stat.math.ethz.ch> Sent: Friday, December 09, 2005 3:31 PM Subject: [Rd] ID for machine?> Does R have a function to obtain a name of the machine that it is > running on? I'm going to be writing results to a database from > several > different machines, and I'd like to be able to identify where they > came > from. > > Duncan Murdoch > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel >Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
On 9 Dec 2005, murdoch at stats.uwo.ca wrote:> Does R have a function to obtain a name of the machine that it is > running on? I'm going to be writing results to a database from > several different machines, and I'd like to be able to identify > where they came from.Sys.info has nodename which should be the hostname.
How about something as trivial as>system('hostname')? Is this for the Wind****s system?Janusz. On Fri, 9 Dec 2005, Duncan Murdoch wrote:> Does R have a function to obtain a name of the machine that it is > running on? I'm going to be writing results to a database from several > different machines, and I'd like to be able to identify where they came > from. > > Duncan Murdoch > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel >