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

moving few packages from Imports to Suggests #93

Closed
IndrajeetPatil opened this issue May 28, 2020 · 1 comment
Closed

moving few packages from Imports to Suggests #93

IndrajeetPatil opened this issue May 28, 2020 · 1 comment
Milestone

Comments

@IndrajeetPatil
Copy link
Contributor

Currently, paletteer imports a number of palette packages only for a single function (mostly here: https://github.com/EmilHvitfeldt/paletteer/blob/37567c57aae4ba4368ad964b457db8148b808ff5/R/paletteer_c_wrappers.R), and I was wondering if it would be better to use them conditionally and move them to Suggests in DESCRIPTION instead of directly importing them.

This would also slightly reduce dependency load for packages like ggstatsplot that rely on paletteer.

For example-

#' @rdname paleteer-c-wrapper
paletteer_c_scico <- function(name, n) {
if (!requireNamespace("scico", quietly = TRUE)) {
    stop("Package 'scico' needed. Please install it by running `install.packages('scico')`.")
  }  

scico::scico(n = n, palette = name)
}

What do you think?

@EmilHvitfeldt
Copy link
Owner

I like the idea! I'll try to whip it into the next update

@EmilHvitfeldt EmilHvitfeldt added this to the 1.2.0 milestone May 28, 2020
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

2 participants