在 R 中查找 Windows 用户名 [英] Find windows user name within R
本文介绍了在 R 中查找 Windows 用户名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有办法在 R 会话中获取当前 Windows 用户名或 Windows 主页?
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)
推荐答案
你可以做
Sys.getenv("USERNAME")
Sys.getenv("HOME")
如果你只是输入
Sys.getenv()
您将看到所有可用的环境变量.
you will see all available environment variables.
这篇关于在 R 中查找 Windows 用户名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文