ronedrivedevtoolslockfilepackage-development

devtools::check - System command 'Rcmd.exe' failed, exit stauts:1, stdout + stderr:


I am currently developing a package for my PhD containing functions for the data analysis for my project. The setup is windows 10 and all files are saved locally on the PC and synchronised to One Drive.

I am able to build my package and was also able to check it. However I closed the R Studio and now (a few days later) that I wanted to work on it again (without changing anything from the code that was previously running with 0 errors, warnings and notes), it does not work. I can still build my package without error but I can not use devtools::check to check it. The output of devtools::check is:

enter image description here

On the Windows File Explorer I noticed that inside the package (name eEP.Analysis.V2) there is the R project folder where a lock file is not synchronized, as can be seen here:

enter image description here Is it possible that this is the cause of the problem? How can I fix this?

Thank you very much for your help.


Solution

  • The problem was indeed caused by the synchronization of OneDrive and the R temporary files. Namely the files from within the R-Project folder caused the problems. The problem does not occur if the automatic synchronization to OneDrive is deactivated. So whenever I work with R I just deactivate the synchronization and this solves the problem (or at least successfully avoids it).