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

JOSS review: missing dependency #576

Closed
kevinrue opened this issue Apr 21, 2021 · 2 comments
Closed

JOSS review: missing dependency #576

kevinrue opened this issue Apr 21, 2021 · 2 comments
Labels
invalid 🙅‍♂️ This doesn't seem right

Comments

@kevinrue
Copy link

When running the first chunk of code in the following section

https://github.com/IndrajeetPatil/ggstatsplot#ggwithinstats

Namely

# for reproducibility and data
set.seed(123)
library(WRS2) # for data
library(afex) # to run anova

# plot
ggwithinstats(
  data = WineTasting,
  x = Wine,
  y = Taste,
  title = "Wine tasting",
  caption = "Data source: `WRS2` R package",
  ggtheme = ggthemes::theme_fivethirtyeight(),
  ggstatsplot.layer = FALSE
)

I get the following error messages

Error in library(afex) : there is no package called ‘afex’
Error in loadNamespace(name) : there is no package called ‘ggthemes’

Obviously, running the following code solves the issue

install.packages('afex')
install.packages('ggthemes')

However, it would be nicer that dependencies are installed with the package itself, to avoid users running into those issues at runtime.


I can see afex in the Suggests section of the DESCRIPTION file.

However, even the full installation command in the README does not install ggthemes:

remotes::install_github(
  repo = "IndrajeetPatil/ggstatsplot", # package path on GitHub
  dependencies = TRUE, # installs packages which ggstatsplot depends on
  upgrade_dependencies = TRUE # updates any out of date dependencies
)

declares installing the following list of packages:

Installing_ 199 packages: mvtnorm, Rcpp, plyr, mime, magrittr, ini, httr, gitcreds, zip, sys, openssl, credentials, askpass, R6, yaml, withr, whisker, rstudioapi, rprojroot, rlang, rappdirs, purrr, lifecycle, jsonlite, glue, gh, gert, fs, desc, curl, crayon, clipr, cli, utf8, vctrs, pkgconfig, pillar, tibble, rematch2, fansi, diffobj, waldo, ps, processx, praise, pkgload, evaluate, ellipsis, digest, callr, brio, base64enc, htmltools, cpp11, systemfonts, fontLiberation, fontBitstreamVera, fontquiver, xfun, markdown, highr, fastmap, xml2, stringr, stringi, knitr, commonmark, brew, xopen, prettyunits, cachem, testthat, sessioninfo, rversions, roxygen2, rcmdcheck, pkgbuild, memoise, usethis, RcppEigen, RcppParallel, colorspace, viridisLite, RColorBrewer, munsell, labeling, farver, backports, matrixStats, checkmate, scales, isoband, gtable, BH, V8, loo, gridExtra, inline, ggplot2, StanHeaders, coda, Brobdingnag, jquerylib, sass, bslib, promises, later, sourcetools, xtable, httpuv, shiny, shinyjs, miniUI, htmlwidgets, rematch, progress, cellranger, readr, hms, forcats, tidyselect, RcppArmadillo, tidyr, generics, openxlsx, readxl, data.table, haven, conquer, MatrixModels, SparseM, numDeriv, dplyr, broom, sp, statmod, nloptr, minqa, lme4, rio, maptools, quantreg, pbkrtest, abind, carData, insight, bayestestR, parameters, effectsize, mc2d, reshape, BWStest, kSamples, SuppDists, Rmpfr, gmp, multcompView, zeallot, deSolve, contfrac, elliptic, hypergeo, gtools, pbapply, gdtools, freetypeharfbuzz, devtools, hunspell, tinytex, rstantools, rstan, logspline, LaplacesDemon, bridgesampling, colourpicker, reshape2, car, lmerTest, WRS2, performance, ipmisc, correlation, BayesFactor, prismatic, PMCMRplus, vdiffr, spelling, rmarkdown, metafor, metaBMA, ggExtra, afex, statsExpressions, patchwork, paletteer, pairwiseComparisons, ggsignif, ggrepel, ggcorrplot


For openjournals/joss-reviews#3167

@kevinrue
Copy link
Author

Hm.. thinking about this more, ggthemes is only used in the user session, i.e. it is not a dependency of ggstatsplot.
So it is natural to leave it to users to install, if they wish to use it.
Closing the issue

@IndrajeetPatil
Copy link
Owner

This is by design.

Error in library(afex) : there is no package called ‘afex’

As you mention, it is in Suggests and the package will suggest the user to install it if the function can't find it:

https://github.com/IndrajeetPatil/statsExpressions/blob/0360a69d77f426832e44e73e2dfa889f40a0a41b/R/oneway_anova.R#L198

even the full installation command in the README does not install ggthemes

This is because ggthemes plays no role at all in ggstatsplot functions. This example is just to show how one can aesthetically modify the default if one wishes to. All ggstatsplot functions have ggtheme argument, whose function is to allow users to install whatever theme package they wish to install. So if someone is choosing to use a theme from ggthemes package, it is safe to assume that they have it installed.

@IndrajeetPatil IndrajeetPatil added the invalid 🙅‍♂️ This doesn't seem right label May 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid 🙅‍♂️ This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants