lizard-bio / nature-grade-visualization-playground

Liz.inno.3 - Playground repo for the BioLizard data visualization packages
MIT License
1 stars 0 forks source link

Failed building R vignette #10

Open akoch8 opened 1 month ago

akoch8 commented 1 month ago

Installing the R package resulted in the following error:

Quitting from lines 316-362 [unnamed-chunk-18] (BioLizardStyleR.Rmd)
   Error: processing vignette 'BioLizardStyleR.Rmd' failed with diagnostics:
   trying to use CRAN without setting a mirror
   --- failed re-building ‘BioLizardStyleR.Rmd’

   SUMMARY: processing the following file failed:
     ‘BioLizardStyleR.Rmd’

   Error: Vignette re-building failed.
   Execution halted
### Tasks
- [x] Explicitly set CRAN mirror in vignette
akoch8 commented 1 month ago

Package can be successfully installed when skipping the vignettes:

devtools::install_github('lizard-bio/nature-grade-visualization-playground', 
                         subdir='BioLizardStyleR', build_vignettes=FALSE)

Trying to explicitly set a CRAN mirror before installing the package did not help:

options(repos=c(CRAN='https://cran.rstudio.com/'))
akoch8 commented 1 month ago

Try installing the packages mentioned in the vignette code:

Note: to succesfully install Pasilla, you might have to manually install libbz2 (libbz2-dev (deb), libbz2-devel (rpm), bzip2 (brew)).
note: to install 'sf' you might have to install libudunits2 and libgdal:
- debian/ubuntu: `sudo apt-get update && sudo apt-get install libudunits2-dev libgdal-dev`
- tophat/fedora: `dnf install udunits2-devel libgdal-devel`
- OSX: `brew install udunits` & `brew install gdal`
aniko-meijer commented 1 month ago

The code chunk where the vignette fails, is the one showing a treemap of the pokemon dataset, and uses the following packages:

if(!require("treemapify", quietly = TRUE)){
  BiocManager::install("treemapify")
}

if(!require("highcharter", quietly = TRUE)){
  install.packages("highcharter")
}

Do you have issues installing either of these two packages? Highcharter could be replaced by something else (goodbye pokémons)

akoch8 commented 1 month ago

Still not working.

Everything I have tried so far (both in Rstudio Version 2024.09.0+375 and in R 4.4.1 GUI 1.80 Big Sur ARM build):

The current error is:

Error: processing vignette 'BioLizardStyleR.Rmd' failed with diagnostics:
   Pandoc is required to build R Markdown vignettes but not available. Please make sure it is installed.

Will try to install pandoc.

akoch8 commented 1 month ago

After running pandoc::pandoc_install(), the pandoc error disappeared, but I'm still stuck at this one:

Error: processing vignette 'BioLizardStyleR.Rmd' failed with diagnostics:
   trying to use CRAN without setting a mirror
   --- failed re-building ‘BioLizardStyleR.Rmd’
aniko-meijer commented 1 month ago

not a very informative error.

Given the high number of issues, it would be better to just host the documentation on a github pages site.. building the vignette is no longer needed then.

akoch8 commented 1 month ago

Sounds good!

aniko-meijer commented 1 month ago

adding packages from the vignette to dependencies in DESCRIPTION file should also help with vignette issues:

install.packages("devtools")
BiocManager::install("treemapify")
install.packages("highcharter")
install.packages("readr")
install.packages("corrr")
install.packages("forcats")
install.packages("sf")
install.packages("rnaturalearth")
install.packages("rnaturalearthdata")

library(treemapify)
library(dplyr)
library(readr)
library(corrr)
library(forcats)
library("sf")
library("rnaturalearth")
library("rnaturalearthdata")

However, not all packages are really required for usage of the package (eg sf for maps or highcharter for pokemon dataset)