On 26.03.2018 23:48, Ogan Mancarci wrote:
This is from CRAN repository policy:
"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). (…) Limited
exceptions may be allowed in interactive sessions if the package obtains
confirmation from the user."
I am unclear about the scope of this rule. For instance if I had this
function:
antiSocialWriteLines = function(text, file = 'defaultFile', ...){
writeLines(text , file, ...)
}
Simply use file=tempfile() as the default so you do not overwrite stuff
in the user filespace and the user can insert another filename which is
the confirmation.
Best,
Uwe Ligges
would I be allowed to add it to a package since it writes to a file by
default without asking for confirmation?
Frankly reading this text, I feel like even writeLines itself violates it
as it writes without "confirmation" once you give it a file path.
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel