Find windows user name within R

后端 未结 3 1555
别跟我提以往
别跟我提以往 2021-02-01 15:55

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)

3条回答
  •  悲&欢浪女
    2021-02-01 16:24

    You can do

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

    And if you just type

    Sys.getenv()
    

    you will see all available environment variables.

提交回复
热议问题