R packaging comments
Closed this issue · 2 comments
Hi there. This is really interesting work.
I notice some aspects of this repo as an R package are non-standard.
Some (hopefully helpful) comments:
-
The repo has a different name to the package. This will confuse inexperienced R users.
-
Your package is called BETS. However there is already a package called BETS on CRAN. See here. Hence when users update thier package after yours is installed, using say
update.packages()
, the CRAN BETS package will replace your package because that has a higher version number than yours. Your best approach here is to rename your package to a name not used on CRAN. A convenient way to check available package names is to useavailable::available("your-proposed-pkg-name")
-
Have you run
R CMD check
a.k.a.devtools::check()
on this package? Currently runningdevtools::check()
returns0 errors v | 2 warnings x | 3 notes x Error: R CMD check found WARNINGs Execution halted Exited with status 1.
The rest of that output flags some of the non-standard issues:
- Simple typo: in
covid19_data
there is a mismatch betweenCases
in the docs and theCase
variable in the rda file. - The
bayesian
folder should not be at the top level. You need to exclude this from the package build in a.Rbuildignore
file or move this folder to an appropriate subdirectory.
- Simple typo: in
There are some other issues listed in the devtools::check()
output. If you would like a PR fixing some of those, I am happy to try.
Best wishes
Tom
Dear Tom,
Thanks. Much of this is work in progress and not organized in a package-ready way, as you correctly pointed out. I will get to the issues you raised asap.
Best wishes,
Qingyuan
Dear Tom,
Thanks again for the great suggestions. I have now moved everything to a new repository and fixed all the errors/warnings/notes. I am closing this issue now.
Best wishes,
Qingyuan