You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You write information messages to the console that cannot be easily
suppressed.
Instead of print()/cat() rather use message()/warning() or
if(verbose)cat(..) if you really have to write text to the console.
(except for print() and summary() functions
Please ensure that your functions do not write by default or in your
examples/vignettes/tests in the user's home filespace (including the
package directory and getwd()). That is not allowed by CRAN policies.
Please only write/save files if the user has specified a directory in
the function themselves. Therefore please omit any default path =
getwd() in writing functions.
In your examples/vignettes/tests you can write to tempdir().
f.i.: authenticate()
You can unwrap the example of authenticate if there is no need for a
token for the function. If it takes longer than 5s, wrap it in \donttest.
When creating the examples please keep in mind that the structure
would be desirable:
\examples{
examples for users and checks:
executable in < 5 sec
\dontshow{
examples for checks:
executable in < 5 sec together with the examples above
not shown to users
}
\donttest{
further examples for users; not used for checks
(f.i. data loading examples, or time consuming functions )
}
\dontrun{
not used by checks, not used by example()
adds the comment ("# Not run:") as a warning for the user.
cannot run (e.g. because of missing additional software,
missing API keys, ...)
}
if(interactive()){
functions not intended for use in scripts,
or are supposed to only run interactively
(f.i. shiny)
}
}
The text was updated successfully, but these errors were encountered:
You write information messages to the console that cannot be easily
suppressed.
Instead of print()/cat() rather use message()/warning() or
if(verbose)cat(..) if you really have to write text to the console.
(except for print() and summary() functions
Please ensure that your functions do not write by default or in your
examples/vignettes/tests in the user's home filespace (including the
package directory and getwd()). That is not allowed by CRAN policies.
Please only write/save files if the user has specified a directory in
the function themselves. Therefore please omit any default path =
getwd() in writing functions.
In your examples/vignettes/tests you can write to tempdir().
f.i.: authenticate()
You can unwrap the example of authenticate if there is no need for a
token for the function. If it takes longer than 5s, wrap it in \donttest.
When creating the examples please keep in mind that the structure
would be desirable:
\examples{
examples for users and checks:
executable in < 5 sec
\dontshow{
examples for checks:
executable in < 5 sec together with the examples above
not shown to users
}
\donttest{
further examples for users; not used for checks
(f.i. data loading examples, or time consuming functions )
}
\dontrun{
not used by checks, not used by example()
adds the comment ("# Not run:") as a warning for the user.
cannot run (e.g. because of missing additional software,
missing API keys, ...)
}
if(interactive()){
functions not intended for use in scripts,
or are supposed to only run interactively
(f.i. shiny)
}
}
The text was updated successfully, but these errors were encountered: