PIFSCstockassessments / ss3diags

R package with advanced diagnostics to evaluate a Stock Synthesis model. Diagnostics include residual analyses, hindcasting and cross-validation techniques, and retrospective analyses.
http://pifscstockassessments.github.io/ss3diags/
2 stars 4 forks source link

dplyr::group_rows and R4SS's kableExtra::group_rows namespace conflict #83

Closed efletcherPIFSC closed 1 year ago

efletcherPIFSC commented 1 year ago

@MOshima-PIFSC Related to #82, Checking ss3daigs with R package checker gave this message early on:

Warning: replacing previous import 'dplyr::group_rows' by 'kableExtra::group_rows' when loading 'r4ss'

Checking the package with r4ss "releases" (1.44.0 & 1.46.1) and at the remote branch were the same. There was no difference when I substituted the ss3diags dplyr dependency for double colon (see #82), I still had the same message. Has the same issue when I checked the package using the code in the main branch.

I didn't find any references of group_rows in ss3diags nor any references found in the r4ss github repo. Then I might of found the culprit: R4ss is importing the whole dplyr and kableExtra libaries: https://github.com/r4ss/r4ss/blob/main/NAMESPACE

I will refer this issue to the r4ss team

iantaylor-NOAA commented 1 year ago

@efletcherPIFSC, Thanks for working on this and sorry that it appeared as an ss3diags issue at first. I would love to make that message go away when installing r4ss but never invested the time in debugging it yet, so you saved me some work there.

I've just pushed this commit to a branch https://github.com/r4ss/r4ss/compare/main...importFrom_kableExtra which moves from importing all of {kableExtra} to just the few functions that are used by r4ss. We could do the same with {dplyr}, but quite a few more functions are used and I'm not sure that will be needed once the conflict is avoided (the group_rows() function is not used from either packages).