corybrunson / ggalluvial

ggplot2 extension for alluvial plots
http://corybrunson.github.io/ggalluvial/
GNU General Public License v3.0
499 stars 34 forks source link

Failed to install github, system command R failed #110

Closed SimonDedman closed 1 year ago

SimonDedman commented 1 year ago

> remotes::install_github("corybrunson/ggalluvial@main", build_vignettes = TRUE)

Downloading GitHub repo corybrunson/ggalluvial@main ✔ checking for file ‘/tmp/RtmpuqbEkP/remotes439eae1e159/corybrunson-ggalluvial-040b0df/DESCRIPTION’ ... ─ preparing ‘ggalluvial’: ✔ checking DESCRIPTION meta-information ... ─ installing the package to build vignettes E creating vignettes (8.9s) --- re-building ‘ggalluvial.rmd’ using rmarkdown Loading required package: ggplot2 Quitting from lines 149-174 (ggalluvial.rmd) Error: processing vignette 'ggalluvial.rmd' failed with diagnostics: there is no package called 'alluvial' --- failed re-building ‘ggalluvial.rmd’

--- re-building ‘labels.rmd’ using rmarkdown Quitting from lines 72-76 (labels.rmd) Error: processing vignette 'labels.rmd' failed with diagnostics: there is no package called 'ggfittext' --- failed re-building ‘labels.rmd’

--- re-building ‘order-rectangles.rmd’ using rmarkdown Warning: The vignette title specified in \VignetteIndexEntry{} is different from the title in the YAML metadata. The former is "order of rectangles", and the latter is "The Order of the Rectangles". If that is intentional, you may set options(rmarkdown.html_vignette.check_title = FALSE) to suppress this check. --- finished re-building ‘order-rectangles.rmd’

--- re-building ‘shiny.Rmd’ using rmarkdown Warning: The vignette title specified in \VignetteIndexEntry{} is different from the title in the YAML metadata. The former is "ggalluvial in Shiny apps", and the latter is "Tooltips for ggalluvial plots in Shiny apps". If that is intentional, you may set options(rmarkdown.html_vignette.check_title = FALSE) to suppress this check. --- finished re-building ‘shiny.Rmd’

SUMMARY: processing the following files failed: ‘ggalluvial.rmd’ ‘labels.rmd’

Error: Vignette re-building failed. Execution halted Error: Failed to install 'ggalluvial' from GitHub: ! System command 'R' failed

Packages updated beforehand, CRAN install worked fine immediately after.

corybrunson commented 1 year ago

Hi @SimonDedman, thanks a lot for checking development version installation; i'm preparing for a "quick" fix to the previous CRAN release.

It looks like the errors were due to some packages ({alluvial} and {ggfittext}) not being installed that are required to build the vignettes. Those packages are listed under Suggests: rather than under Imports: in the DESCRIPTION, which i understand to be the correct policy for packages that are only required for vignettes. Could you install those packages and try again?

SimonDedman commented 1 year ago

That works. However I'd have a think about whether it's more important to follow the advised policy for suggests vs imports, if doing so causes the install to fail. If the expected pathway is: user installs package, fails, searches bug page, finds this thread, follows instructions, tries again... that might cause you more hassle than it's worth? And that's assuming folks do those steps rather than starting their own thread, emailing you directly, or just giving up.

corybrunson commented 1 year ago

I could be wrong, but my understanding / memory is that having packages listed under Imports: that are only used in vignettes results in a note or warning that prevents publication on CRAN. (I'll make a point to test this.) In any event, the R package guide provides the core reasons to follow this practice, which i agree with—i don't want someone to be unable to use {ggalluvial} because they don't have {ggfittext} installed, for example.

One thing to note is that you can specify dependencies = TRUE in remotes::install_github() (as in install.packages()) to install packages listed under Suggests: as well as those necessary for the package to function. This should prevent having to run a second set of installs after one fails with build_vignettes = TRUE. Though, as you say, someone new to the subtlety will still easily make the mistake once. (Ultimately, i think any R user will eventually have to deal with error messages like this that are a few levels deep and require help, if only through searching the email lists or Q&A fora. My experience convinces me that having some interaction with the developer community is part of being a regular user.)