An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20090316/bc10389a/attachment-0002.pl>
Get user system name
5 messages · Sundar Dorai-Raj, Etienne Bellemare Racine, Duncan Murdoch
Assuming "USER" is defined on your system then
Sys.getenv("USER")
ought to work.
--sundar
On Mon, Mar 16, 2009 at 3:04 PM, Etienne Bellemare Racine
<etiennebr at gmail.com> wrote:
I would like to get the name of the user form the system. Is it possible ? Something like ?>system.user() returning something like [1] "etber12" Thanks, Etienne ? ? ? ?[[alternative HTML version deleted]]
______________________________________________ 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.
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20090316/f708dad8/attachment-0002.pl>
If that's the case, it's best to post the output from "version" to this thread. Type "version" from the R command prompt and paste the results here. On Mon, Mar 16, 2009 at 3:14 PM, Etienne Bellemare Racine
<etiennebr at gmail.com> wrote:
It seems like it is not defined. I get an empty string. Is there a
workaround or another solution ?
--
Etienne
Sundar Dorai-Raj a ?crit?:
Assuming "USER" is defined on your system then
Sys.getenv("USER")
ought to work.
--sundar
On Mon, Mar 16, 2009 at 3:04 PM, Etienne Bellemare Racine
<etiennebr at gmail.com> wrote:
I would like to get the name of the user form the system. Is it possible ?
Something like
?>system.user()
returning something like
[1] "etber12"
Thanks,
Etienne
? ? ? ?[[alternative HTML version deleted]]
______________________________________________ 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.
On 16/03/2009 6:09 PM, Sundar Dorai-Raj wrote:
Assuming "USER" is defined on your system then
Sys.getenv("USER")
ought to work.
In Windows you need to look at
Sys.getenv("USERNAME")
instead.
Duncan Murdoch