7

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.

gruvn
  • 692
  • 1
  • 6
  • 25
  • 4
    one approach: 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'. – J_F Sep 19 '16 at 11:42
  • That solved it J_F - thanks! – gruvn Sep 19 '16 at 12:13

2 Answers2

5

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

J_F
  • 9,956
  • 2
  • 31
  • 55
1

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
Paul
  • 527
  • 5
  • 17