ubuntu-14.04 - RStudio 无法访问 Ubuntu 上的 .Rhistory

标签 ubuntu-14.04 rstudio

我正在 RStudio 上处理 markdown 文件。我的笔记本电脑上有 Ubuntu 14.04。我使用knitr 生成html 文件。我决定清理我的环境并在最后添加 rm 和 gc 命令。 现在我的控制台窗口中有一条消息:

Error attempting to read history from ~/.Rhistory: permission denied (is the .Rhistory file owned by root?)

这是什么意思?这对我的代码有害吗?

最佳答案

你是对的 - 第一次运行它时,你处于 sudo 模式,并且 .Rhistory 文件是使用 root 作为所有者创建的。以 root 身份运行 RStudio 可以消除该症状,但并不理想。为了能够以普通用户身份运行它,只需更改 .Rhistory 文件的所有者即可:

sudo chown -c <user_name> .Rhistory

关于ubuntu-14.04 - RStudio 无法访问 Ubuntu 上的 .Rhistory,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35186217/

相关文章:

r - 脚本中的 ggplot 绘图不会在 Rstudio 中显示

android - 如何调试 Project Tango C 示例

rvm - Ubuntu 14.04.1 中的 Ruby 2.1.3 安装挂起?

r - 如何摆脱 Rstudio : Error creating notebook: object 'html_notebook' not found? 中的此错误消息

r - 确保在运行 .Rprofile 之前加载了所有默认包

linux - 无法使用 iptables 打开端口以使用 rstudio 服务器

r - 我想用循环更改列名

swift - 无法使用 ubuntu 14.04 在强制 swift2 中将类型 'NSString' 的值转换为类型 'String'

MySQL 错误访问被拒绝

c++ - 如何更改从多个源文件编译的 g++ 生成的 Linux 共享库的入口点?