Spencer Graves
2020-Apr-17 14:14 UTC
[Rd] How to find detritis rejected by "R CMD check" on Debian?
Hello: ????? How can someone help me find and fix the following, contained in 00check.log on Debian for "https://github.com/JamesRamsay5/fda": NOTE Found the following files/directories: ? ?fdaMatlabPath.m? * checking for detritus in the temp directory ... OK ????? See: https://win-builder.r-project.org/incoming_pretest/fda_5.1.3_20200416_225207/Debian/00check.log ????? Thanks, ????? Spencer Graves
Dirk Eddelbuettel
2020-Apr-17 14:29 UTC
[Rd] How to find detritis rejected by "R CMD check" on Debian?
Spencer, On 17 April 2020 at 09:14, Spencer Graves wrote: | ????? How can someone help me find and fix the following, contained in | 00check.log on Debian for "https://github.com/JamesRamsay5/fda": | | NOTE | Found the following files/directories: | ? ?fdaMatlabPath.m? | * checking for detritus in the temp directory ... OK Obviously from your package, so you could use a tool like 'grep' locally. We can just turn to Gabor's handy CRAN mirror at GitHub, open the repo at github.com/cran/fda and enter the filename in the search. Second hit is writeLines(d2a, 'fdaMatlabPath.m') which is obviously a file _you write_ and not not delete just as the package checking diagnostic suggests. As frequently suggested here or on r-package-devel (where this belonged), prefix paths by `tempdir()` or change there first. Dirk -- http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
Ivan Krylov
2020-Apr-17 14:32 UTC
[Rd] How to find detritis rejected by "R CMD check" on Debian?
This should probably have been addressed to R-pkg-devel, not Rd. On Fri, 17 Apr 2020 09:14:44 -0500 Spencer Graves <spencer.graves at prodsyse.com> wrote:> Found the following files/directories: > ? ?fdaMatlabPath.m?This is not the "detritus in the temp directory"; the message is related to the previous line in the log:>> * checking for non-standard things in the check directory ... NOTEI searched the repo for the file name in question and got a few hits [1]. R CMD check runs the \examples{}, including those in man/fdaMatlabPath.Rd. The function from R/fdaMatlabPath.R, called from the examples, writes a file in the current directory [2], which happens to be the check directory during R CMD check. In order to conform to the CRAN policy, the function should receive the target file name as a parameter instead, and the example should pass a file path somewhere in tempdir(). -- Best regards, Ivan [1] https://github.com/JamesRamsay5/fda/search?q=fdaMatlabPath.m [2] https://github.com/JamesRamsay5/fda/blob/ca077f87f69efcfc434eeea39f4fff6136fcfaeb/R/fdaMatlabPath.R#L33
Duncan Murdoch
2020-Apr-17 14:33 UTC
[Rd] How to find detritis rejected by "R CMD check" on Debian?
On 17/04/2020 10:14 a.m., Spencer Graves wrote:> Hello: > > > ????? How can someone help me find and fix the following, contained in > 00check.log on Debian for "https://github.com/JamesRamsay5/fda": > > > NOTE > Found the following files/directories: > ? ?fdaMatlabPath.m? > * checking for detritus in the temp directory ... OK > > > ????? See:That would have resulted from running the example in ?fdaMatlabPath. You could stop that from happening in a test by using if (interactive()) fdaMatlabPath() but it still potentially wipes out a user's file. Can't you ask the user for the filename to write to, and have the example write to tempdir() instead of the current directory? Duncan Murdoch