Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using RStudio's "Build" but no *.Rcheck generated

I've just started using RStudio's build check, and used it to make one package already. I've started on a second package, and this one is failing. As the build attempt happens, I get updates like:

* checking whether package ‘< package >’ can be installed ... ERROR
Installation failed.
See ‘/home/user/git/< package >.Rcheck/00install.out’ for details.
* DONE
Status: 1 ERROR

The problem is that the defined folder < package >.Rcheck doesn't exist, and neither do the files that are supposed to be in it (i.e. 00install.out, and 00check.log). Also, where I write < package >, the actual name of my package is shown instead.

I had folders view visible while the package was building, and I saw the .Rcheck folder appear, and then disappear shortly after. I was even able to browse the 000install.out file, but it had not yet encountered any errors.

It appears that the whole Rcheck folder is being removed when the build fails, leaving me with no trace of what caused the error.

Has anyone else experienced this? I'm using RStudio version 0.99.902 with R version 3.3.1 on Arch Linux.

like image 867
gruvn Avatar asked Sep 19 '16 11:09

gruvn


2 Answers

My approach is the following one:

Go to 'Tools' -> 'Global Options' -> 'Packages' and then have a look, if 'View Rcheck directory after failed R CMD check' is ticked. You find other useful options there, too, e.g. 'Cleanup output after successful R CMD check'.

enter image description here

like image 116
J_F Avatar answered Nov 16 '22 00:11

J_F


A little more detail on how to preserve error logs, based on the answer from @J_F. I needed to tick View Rcheck directory after failed R CMD check, because the cleanup occurs after the misleading message

See
  ‘.../yourpackage.Rcheck/00check.log’
for details.

I also needed to untick Cleanup output after successful R CMD check, because R CMD can succeed even when there are errors!

R CMD check results
1 error  | 3 warnings | 2 notes
Warning messages:
1: `cleanup` is deprecated 
2: Version of roxygen2 last used with this package is 6.0.1.9000.  You only have version 6.0.1 

R CMD check succeeded
like image 44
Paul Avatar answered Nov 16 '22 01:11

Paul