[R-pkg-devel] Error in CHECK caused by dev.off()

Duncan Murdoch murdoch@dunc@n @end|ng |rom gm@||@com
Thu Jul 23 15:13:31 CEST 2020


On 23/07/2020 8:18 a.m., Helmut Schütz wrote:
> Hi David,
> 
> David Cortes wrote on 2020-07-23 13:16:
>> It is explained here:
>> https://cran.r-project.org/web/packages/policies.html
>> Section about source packages:
>> "Packages should not write in the user’s home filespace (including
>> clipboards), nor anywhere else on the file system apart from the R
>> session’s temporary directory (or during installation in the location
>> pointed to by TMPDIR: and such usage should be cleaned up)."
> 
> THX; I missed that! However, the policy continues:
> "Limited exceptions may be allowed in interactive sessions if the
> package obtains confirmation from the user."
> IMHO, this is applicable here (i.e., the user _should_ specify a
> directory (as recommended in the man-pages), and only if none is
> provided, a warning is issued and confirmation obtained).
> If I would use tempdir() and the user forgets to copy the result files
> to another location and closes the console, everything would be lost and
> the user would have to start again from scratch. I think that this is
> not very user-friendly.

I would issue an error instead of a warning, and in the error message, 
suggest some code that should work.

Duncan Murdoch



More information about the R-package-devel mailing list