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

Move ggplot2 from Depends to Imports #56

Closed
nanxstats opened this issue May 28, 2022 · 1 comment
Closed

Move ggplot2 from Depends to Imports #56

nanxstats opened this issue May 28, 2022 · 1 comment

Comments

@nanxstats
Copy link
Collaborator

I suggest we move ggplot2 from Depends to Imports in DESCRIPTION, and, if necessary, update the code and vignettes (e.g., use extra ggplot2:: or library(ggplot2) due to it not being attached anymore when loading gsDesign).

This is for a few reasons:

  1. Imports probably fits the use case better than Depends, considering plotting is not the main functionality of gsDesign. As indicated by r-pkgs:

Unless there is a good reason otherwise, you should always list packages in Imports not Depends. That's because a good package is self-contained, and minimises changes to the global environment (including the search path). The only exception is if your package is designed to be used in conjunction with another package. For example, the analogue package builds on top of vegan. It’s not useful without vegan, so it has vegan in Depends instead of Imports. Similarly, ggplot2 should really Depend on scales, rather than Importing it.

  1. I'm always seeing the "Loading required package" message, sometimes with one of these "random tips":
library(gsDesign)
Loading required package: ggplot2
random tip here

They are good tips but kind of a distraction here.

  1. Usage data tells a story. Today, ggplot2 has 451 reverse depends, 3067 reverse imports, and 1258 reverse suggests on CRAN. Among the 451 reverse depends, 100+ are apparently visualization/ggplot2 extension packages. Thus, with a 10:1 ratio, Imports is the much more mainstream usage when compared to Depends for ggplot2.
@nanxstats
Copy link
Collaborator Author

Fixed by 09d302b

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