windows - 在 R 中查找 Windows 用户名

标签 windows r

有没有办法在 R session 中获取当前 Windows 用户名或 Windows 主页?

谢谢。
(抱歉,如果我遗漏了什么,但我找不到任何东西)

最佳答案

你可以做到

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

如果你只是输入

Sys.getenv()

您将看到所有可用的环境变量。

关于windows - 在 R 中查找 Windows 用户名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10164719/

相关文章:

C++ USB通讯

windows - Shellexecute 是否会与启动进程共享环境变量

windows - windows 的 "notify-send"等效项是什么?

r - 如何将多列连接成一列并删除重复项?

r - 从分面 ggplot 中提取行数

r - 如何在 R 中将 `...` 捕获到字符串中

r - 在 Chromebook Samsung 3 上安装 R 和 RStudio

windows - 在 Windows 8 中使用 mysqldump 自动备份 MySQL @localhost

c# - 如何在 Windows Phone 8.1 中清除导航缓存模式的缓存

r - 使用 ggplot2 对齐子集数据点