Find windows user name within R

r, windows

Solution

You can do

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

And if you just type

Sys.getenv()

you will see all available environment variables.

Problem

Is there a way to get the current windows user name or the windows home within an R session? Thanks. (Sorry, if I missed something, but I couldn't find anything)

Original source