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]]
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.
>
This one is the one working for me. Thanks ! -- Etienne Gábor Csárdi a écrit :> Etienne, > > >> Sys.info()["user"] >> > user > "csardi" > > Best, > Gabor > > On Mon, Mar 16, 2009 at 11:04 PM, Etienne Bellemare Racine > <etiennebr@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@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. >> >> > > > >[[alternative HTML version deleted]]
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