Closed LiNk-NY closed 5 years ago
Hi Marcel @LiNk-NY,
That function comes from regionReport
which I added based on Karthik's feedback on his peer review report for regionReport
at https://f1000research.com/articles/4-105/v1#referee-response-8558.
I'll change this a bit so it'll still give the user the list of packages they need to install before stopping, in case there are multiple packages so they don't have to go through multiple rounds of errors.
Best, Leo
Hi Marcel @LiNk-NY,
That function comes from
regionReport
which I added based on Karthik's feedback on his peer review report forregionReport
at https://f1000research.com/articles/4-105/v1#referee-response-8558.I'll change this a bit so it'll still give the user the list of packages they need to install before stopping, in case there are multiple packages so they don't have to go through multiple rounds of errors.
Best, Leo
Yes, it's good to move packages to Suggests
when they are not essential to the codebase and to use requireNamespace
for checking. But you shouldn't install packages for users.
I would recommend to have users set the dependencies = TRUE
argument in BiocManager::install
to get all Suggests
dependencies, if need be.
Ahh, thanks Marcel, I didn't know about dependencies = TRUE
. In any case, I think that the code should work well now and not mess with users' installed packages.
Best, Leo
Hi Leonardo, @lcolladotor Please remove package installation code from
recount
. Assume that the package is installed. If said package is in theSuggests
fields and it is required for a function, check usingrequireNamespace
, thenstop
if the package is not available, and ask the user to install it first. Do not install the package for the user.https://github.com/leekgroup/recount/blob/8da982b309e2d19638166f263057d9f85bb64e3f/R/utils.R#L14-L32 Best, Marcel