Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement changes for Package suggested by CRAN team #14

Open
4 tasks
TammoReinders opened this issue Mar 18, 2025 · 1 comment
Open
4 tasks

Implement changes for Package suggested by CRAN team #14

TammoReinders opened this issue Mar 18, 2025 · 1 comment
Labels
CRAN package Needed to host as a package on CRAN on hold This is currently not worked on but will be in the future

Comments

@TammoReinders
Copy link

  • Replace the \dontrun{}-wrapper with if(interactive()){}
  • Add test function for not exported function via testthat
  • Remove user options changes or use immediate call of on.exit() (see e.g.)
  • Remove set.seed functionality
@TammoReinders TammoReinders added CRAN package Needed to host as a package on CRAN on hold This is currently not worked on but will be in the future labels Mar 18, 2025
@TammoReinders
Copy link
Author

Thanks,

Please replace the \dontrun{}-wrapper with if(interactive()){}.

Since we cannot automatically check shiny interfaces, the best solution would be to write tests for your not exported function (e.g. using package testthat). Otherwise we wouldn't detect that your package does not work any more because of changes in R or the packages you depend on.

Please make sure that you do not change the user's options, par or working directory. If you really have to do so within functions, please ensure with an immediate call of on.exit() that the settings are reset when the function is exited.
e.g.:
...
oldpar <- par(no.readonly = TRUE) # code line i
on.exit(par(oldpar)) # code line i + 1
...
par(mfrow=c(2,2)) # somewhere after
...
e.g.: -> R/utils_color_preview_function.R; R/app_server.R If you're not familiar with the function, please check ?on.exit. This function makes it possible to restore options before exiting a function even if the function breaks. Therefore it needs to be called immediately after the option change within a function.

Please do not set a seed to a specific number within a function. -> app_server.R, line 1045

Please fix and resubmit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CRAN package Needed to host as a package on CRAN on hold This is currently not worked on but will be in the future
Projects
None yet
Development

No branches or pull requests

1 participant