r - .Rprofile not accessible while using renv - Stack Overflow

I am using renv for this project and everything was working fine. I think the .Rprofile created by renv

I am using renv for this project and everything was working fine. I think the .Rprofile created by renv got corrupted. Now I can't open or delete that .Rprofile.

I tried accessing the file but the file can't be opened.

> usethis::edit_r_profile(scope = c("project"))

Error: [EACCES] Failed to open '/rwi/users/ushrestha/github/dh_inidcation_catalog/Batch Cohort Application/.Rprofile': permission denied

I am not able to activate renv now.

renv::activate()

Error in file(con, "r") : cannot open the connection
In addition: Warning message:
In file(con, "r") :
  cannot open file '/rwi/users/ushrestha/github/dh_inidcation_catalog/Batch Cohort Application/.Rprofile': Permission denied

How can I restore the .Rprofile. I have tried to delete, edit the file but it's not working. I am also not able to change the github repo branch or go to the previous commit.

I am using renv for this project and everything was working fine. I think the .Rprofile created by renv got corrupted. Now I can't open or delete that .Rprofile.

I tried accessing the file but the file can't be opened.

> usethis::edit_r_profile(scope = c("project"))

Error: [EACCES] Failed to open '/rwi/users/ushrestha/github/dh_inidcation_catalog/Batch Cohort Application/.Rprofile': permission denied

I am not able to activate renv now.

renv::activate()

Error in file(con, "r") : cannot open the connection
In addition: Warning message:
In file(con, "r") :
  cannot open file '/rwi/users/ushrestha/github/dh_inidcation_catalog/Batch Cohort Application/.Rprofile': Permission denied

How can I restore the .Rprofile. I have tried to delete, edit the file but it's not working. I am also not able to change the github repo branch or go to the previous commit.

Share Improve this question edited Mar 31 at 21:16 sutsabs asked Mar 31 at 21:01 sutsabssutsabs 4273 silver badges16 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

In a new posit session when opened the same project, I was able to activate the renv and create the Rprofile.

setwd("path/to/your/home/directory")  # Change to a directory where you have write access

# Activate renv
renv::activate()

file.create(".Rprofile")

After this the renv worked fine and I was also able to update the git repo.

# Restore the environment
renv::restore()

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1743921044a4530063.html

相关推荐

  • r - .Rprofile not accessible while using renv - Stack Overflow

    I am using renv for this project and everything was working fine. I think the .Rprofile created by renv

    22小时前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信