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

Helmut Schütz he|mut@@chuetz @end|ng |rom beb@c@@t
Thu Jul 23 12:44:06 CEST 2020

Dear Duncan,

Duncan Murdoch wrote on 2020-07-22 23:48:
> On 22/07/2020 5:40 p.m., Helmut Schütz wrote:
>> Duncan Murdoch wrote on 2020-07-22 21:42:
>>> During a check, it probably wouldn't, because you aren't allowed to 
>>> write to "~/".  Your package should be writing to tempdir(), or a 
>>> location entered by the user.
>> The user is asked to provide a certain path indeed. Only if none is 
>> provided, the fallback is "~/" (which is always writable). 
> That disqualifies your package from inclusion on CRAN.

Can you please point to such a policy in the R-Extension Manual? Eight 
versions of the package were accepted by CRAN and three times checked by 
members of the team.

BTW, the package passed on winbuilder:
Your package replicateBE_1.0.14.9000.tar.gz has been built (if working) 
and checked for Windows.
Please check the log files and (if working) the binary package at:
The files will be removed after roughly 72 hours.
Installation time in seconds: 41
Check time in seconds: 251
Status: 1 NOTE
R version 4.0.2 (2020-06-22)
Hence, I suspect that there is a problem with CHECK which I run locally 
on my machine.

> If no destination is provided and tempdir() isn't acceptable, you 
> shouldn't write anything.  The user may be keeping an irreplaceable 
> piece of information in "~/test.png", and your package would destroy 
> it.  It's not your decision to make to trespass on the user's file space.

The package is used in a regulated environment (e.g., for the FDA). The 
name of the file is always unique, i.e., depends on the input. The code 
checks whether a file with the same name already exist and -- if yes -- 
asks the user to confirm overwriting it.
The man-pages make clear that a path should be provided. If none is 
provided, a message is issued informing the user that results are saved 
in the home directory. By using tempdir() the user would have to move 
all files to another location before the session is closed.


Ing. Helmut Schütz
BEBAC – Consultancy Services for
Bioequivalence and Bioavailability Studies
Neubaugasse 36/11
1070 Vienna, Austria
E helmut.schuetz using bebac.at
W https://bebac.at/
F https://forum.bebac.at/

More information about the R-package-devel mailing list