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

Unexported prior functions causing CRAN check note #54

Open
bking124 opened this issue Mar 30, 2023 · 1 comment
Open

Unexported prior functions causing CRAN check note #54

bking124 opened this issue Mar 30, 2023 · 1 comment

Comments

@bking124
Copy link

Thanks for the great package! I am trying to use dbarts (specifically the dbarts function) in a package I am developing and would like to submit on CRAN. In one of my functions I have a line of code:

sampler = dbarts(y ~ X, test = X_test,
                   control = control,
                   tree.prior = cgm(power, base),
                   node.prior = normal(k),
                   resid.prior = chisq(sigdf, sigquant),
                   sigma = sigest)

However, I get a note from the CRAN check saying

no visible global function definition for 'cgm'

and similarly for normal and chisq, as these functions are not exported by dbarts. Do you know of any way to resolve this note? For the future, would you be open to exporting these functions (perhaps in much the same way as rstanarm exports their priors) so that others won't encounter such an issue?

I know that a note won't necessarily make or break CRAN acceptance, but it's always nice to be able to clear as many as possible so that less review is needed.

@bking124
Copy link
Author

bking124 commented Apr 4, 2023

As a follow-up, I was able to suppress this note with
if(getRversion() >= "2.15.1") utils::globalVariables(c("cgm", "normal", "chisq"))
but I still think exporting the priors would be a good thing to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant