Dear all,
When submitting my package parfm, I get 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:
'NUL'
so that my submission is rejected.
I cannot find any file or directory called NUL in my package.
Do you have any suggestion?
Thanks in advance to anybody providing their feedback
Best
Federico Rotolo
[R-pkg-devel] Note on submission Found the following files/directories: 'NUL'
4 messages · ROTOLO, Federico /FR, Ivan Krylov, John C Nash
? Fri, 25 Nov 2022 09:59:10 +0000 "ROTOLO, Federico /FR" <Federico.ROTOLO at sanofi.com> ?????:
When submitting my package parfm, I get 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:
'NUL'
so that my submission is rejected.
I cannot find any file or directory called NUL in my package.
Do you have any suggestion?
The file gets created during the check when you call sink('NUL'):
https://github.com/cran/parfm/blob/8c3f45291514aedde67cecf0b090ddd3487f3ada/R/parfm.R#L260-L299
It mostly works on Windows, where "nul" with any extension in any
directory is the null file, but it creates a file named 'NUL' on other
operating systems. It also breaks the non-default sink, if any was set
up by the user.
Does optimx::optimx produce output that can't be turned off otherwise?
(Does it help to set control$trace = 0?) Have you tried
suppressMessages() or capture.output() with nullfile()?
Best regards, Ivan
? Fri, 25 Nov 2022 13:10:39 +0300 Ivan Krylov <krylov.r00t at gmail.com> ?????:
It also breaks the non-default sink, if any was set up by the user.
That's not correct, I'm sorry. sink() maintains a stack of diversions and will automatically restore the user-chosen sink(), if any was set up, when you call sink(NULL).
Best regards, Ivan
FWIW: optimx::optimx is outdated and only there for legacy use. Better to use the optimx::optimr() function for single solvers. JN
On 2022-11-25 05:10, Ivan Krylov wrote:
? Fri, 25 Nov 2022 09:59:10 +0000 "ROTOLO, Federico /FR" <Federico.ROTOLO at sanofi.com> ?????:
When submitting my package parfm, I get 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:
'NUL'
so that my submission is rejected.
I cannot find any file or directory called NUL in my package.
Do you have any suggestion?
The file gets created during the check when you call sink('NUL'):
https://github.com/cran/parfm/blob/8c3f45291514aedde67cecf0b090ddd3487f3ada/R/parfm.R#L260-L299
It mostly works on Windows, where "nul" with any extension in any
directory is the null file, but it creates a file named 'NUL' on other
operating systems. It also breaks the non-default sink, if any was set
up by the user.
Does optimx::optimx produce output that can't be turned off otherwise?
(Does it help to set control$trace = 0?) Have you tried
suppressMessages() or capture.output() with nullfile()?