-
Notifications
You must be signed in to change notification settings - Fork 8
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
Resolve R CMD check note about 'scales' package #672
Conversation
Thanks @arni-magnusson for the PR. I am not entirely sure why it thinks that we do not need scales because it is used in some {ggplot2} code here Line 183 in f0d4e76
Though we should change to scales::label_date() per the documentation for scales::date_format() but that is a different issue.
I always thought that if a package is used within the code it should be in imports and if it is used by developers say for creating data sets like {usethis} can be in the data-raw folder, then it should be in Suggests. Feel free to correct me if I am wrong. |
You're absolutely right. At closer inspection, I can see that the This Note from R CMD check is effectively a false positive. I hadn't come across this case of false positive from R CMD check before, as I tend to use Wickham and Bryan point to a workaround solution in their section 11.4.1.1, defining a dummy ignore_unused_imports() function. I've modified the pull request to apply this solution, also used in devtools. Feel free to ignore the pull request if this solution seems clunky :) An alternative solution pointed out by Wickham and Bryan section 11.4.1.1 would be to add this entry to FIMS-package.R: |
@arni-magnusson thank you for your pull request. Upon further investigation, I believe that this is happening because {scales} is used inside of Second, all future contributions should be made to dev and not main. This is a new protocol for us as of ~ June so it is not well documented. I will try to fix that. |
I finally figured it out 😓! Line 169 in the following code is incorrect Lines 166 to 177 in f0d4e76
It should be
because the @arni-magnusson let me know if you would like to modify your PR to have proposed fix to dev or I can open a new PR. Thanks again 🙏 for bringing this up. Although, it turned into quite the 🐰 🕳️ it was a fun one. Below are some references that helped me find some answers. |
Thanks for the investigation and following up, @kellijohnson-NOAA. I've modified the PR to target the dev branch. That was a new button for me to learn about in GitHub :) |
For plot to be properly documented and rendered all arguments must be present in the methods, previously we only had x, which led to scales not being seen as a package that was needed. Now that y and ... have been added the package is compiling without the error noted by Part of #671 Close the PR #672, which is no longer needed with this commit. The methods proposed in #672 was a work around where this commit fixes the problem.
For plot to be properly documented and rendered all arguments must be present in the methods, previously we only had x, which led to scales not being seen as a package that was needed. Now that y and ... have been added the package is compiling without the error noted by Part of #671 Close the PR #672, which is no longer needed with this commit. The methods proposed in #672 was a work around where this commit fixes the problem.
@arni-magnusson thank you for this PR I have fixed it in a20b806 with a slightly different method than what you outlined and I described it above. The warning is now taken care of. Thank you again for the contributions and bringing it to my attention. |
This pull request resolves a Note raised by R CMD check, moving the
scales
package from Imports to Suggests.The
scales
package is not imported from, so I'm guessing it's not required as an Imports entry. Not a big issue - just trying to keep R CMD check happy :)