Remove dependency on tibble
markvanderloo opened this issue · 6 comments
Dear Allison,
First of all: thank you for making this package available. It is a great data set for teaching!
I noticed that the package imports tibble
, while tibble
is not used anywhere in the R
folder. It can therefore be removed from the DESCRIPTION
file. This makes the package more lightweight to install.
Explicitly, tibble
also depends on packages, which depend on packages again, and so on. This means that when I install palmerpenguins
in a clean R installation, a total number of 66 extra packages will be installed. None of these packages, including tibble
, are needed to use the penguins
data set.
I'm happy to make a PR if you agree.
Thanks again for all the work,
Mark
Hi @markvanderloo,
Thank you raising this issue. @allisonhorst and I discussed, and decided to remove the dependency in the interest of making this data package as lightweight as possible, as you can see in the merged PR above. If that addresses your concerns, can you let us know here and we'll close the issue?
Alison / Allison
Hi Alison & Allison,
Thanks for the quick response. I downloaded the pkg and can build and R CMD check
it without problems(**). (I left out the vignette folder to do a quick check) .
So I will close this issue. Thanks for the feedback!
(**) You seem to be missing the Maintainer
: field in the DESCRIPTION
now.
Depending on who will submit it to CRAN, you can modify and add the following line to DESCRIPTION
and all should be fine.
Maintainer: Firstname Lastname <emailadres@ofthemaintainer.com>
Not sure where you got 66 from. I only see 15:
path <- tempfile()
dir.create(path)
.libPaths(path)
install.packages("tibble")
length(dir(path))
#> [1] 15
(**) You seem to be missing the Maintainer: field in the DESCRIPTION now.
That is not a required field, it is generated from Authors@R
, no need to add it. Please see "Writing R Extensions".
@hadley I used miniCRAN::pkgDep()
. but this includes (recursive) suggests. I should have done this:
> tools::package_dependencies('tibble', recursive=TRUE)
$tibble
[1] "cli" "crayon" "ellipsis" "fansi" "lifecycle"
[6] "magrittr" "methods" "pillar" "pkgconfig" "rlang"
[11] "utils" "vctrs" "assertthat" "glue" "grDevices"
[16] "utf8" "digest" "tools"
Which includes recursive Imports
, Depends
, and LinkingTo
, so no optional dependencies here.
But even if tibble
was dependency-free it would be unnecessary to import it into a data package.
@gaborcsardi I got a build error with R CMD check
pointing out the missing field, so I filled it in.