Find windows user name within R Find windows user name within R r r

Find windows user name within R


You can do

Sys.getenv("USERNAME")Sys.getenv("HOME")

And if you just type

Sys.getenv()

you will see all available environment variables.


I prefer this

Sys.info()[["user"]]


If you know how to do it at your system console, the answer would generally be:

system("...that_string...")