[R-pkg-devel] Error in CHECK caused by dev.off()
d@v|d@corte@@r|ver@ @end|ng |rom gm@||@com
Thu Jul 23 13:16:22 CEST 2020
It is explained here:
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)."
And I think the policy was different at some point in the past. Anyway,
it's a good policy - just get a temporary folder and your desired file
name - e.g.:
On Thu, 2020-07-23 at 12:44 +0200, Helmut Schütz wrote:
> 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?
> versions of the package were accepted by CRAN and three times checked
> members of the team.
> BTW, the package passed on winbuilder:
> Your package replicateBE_184.108.40.20600.tar.gz has been built (if
> 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
> 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).
> name of the file is always unique, i.e., depends on the input. The
> 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
> in the home directory. By using tempdir() the user would have to
> all files to another location before the session is closed.
More information about the R-package-devel