Skip to content

[R-pkg-devel] CRAN-compatible location for output of example code?

2 messages · Michael Gruenstaeudl, Jeff Newmiller

#
Assume an R package that generates a figure ('output.pdf') as the result 
of executing the example code specified in one of the manual files (i.e. 
an .Rd file). The example code specifies the figure to be saved to the 
root directory of the package (i.e., where files DESCRIPTION and 
NAMESPACE are located).

\examples{
...
outFile <- paste(getwd(), "output.pdf", sep="")
...
}

Upon submitting the package to CRAN, I receive the NOTE that the 
following note:

Flavor: r-devel-linux-x86_64-debian-gcc
Check: for non-standard things in the check directory, Result: NOTE
   Found the following files/directories:
     'output.pdf'

To which folder should I have the example code save the output file in 
order for the code to be compatible with the CRAN submission guidelines?
#
https://stat.ethz.ch/R-manual/R-devel/library/base/html/tempfile.html

?tempdir
On July 4, 2019 3:25:25 PM PDT, Michael Gruenstaeudl <mi.gruenstaeudl at gmail.com> wrote: