JonasMoss / univariateML

An R package for maximum likelihood estimation of univariate densities.
https://jonasmoss.github.io/univariateML/
Other
8 stars 6 forks source link

Make minimal references to some packages that R-CMD-CHECK does not see #54

Closed tripartio closed 1 month ago

tripartio commented 1 month ago

When trying to CHECK the package for another PR, I keep running into the annoying point that R-CMD-CHECK does not see some usages of some packages and so keeps on complaining about it. I saw your attempt to get around this with the imports.R file, but unfortunately, that doesn't seem to work. So, I've tried to fix this by adding the invisible() calls directly in some relevant ml* functions. That's a bit messy since it clutters the code just for a workaround, but it should permanently silence R-CMD-CHECK. So, this PR is just a proposal; I don't know if you'll like this workaround.

Note that I did not do anything about the tibble reference because I've submitted another PR (https://github.com/JonasMoss/univariateML/pull/53) that directly uses the tibble package, thus resolving the issue legitimately.

JonasMoss commented 1 month ago

This is a good idea! I'll merge for now, but will most likely change it when implementing the major changes in the attributes branch. (These invisible calls can be placed into any function, right? For instance a __import function in zzz.R.)

tripartio commented 1 month ago

(These invisible calls can be placed into any function, right? For instance a __import function in zzz.R.)

I'm not sure; it's a bit of a mystery to me what R-CMD-CHECK can see or not. I created the PR by trial and error. So, maybe that would work as well.