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...")