trashbirdecology / bbsAssistant

An R package for downloading and handling data and information from the North American Breeding Bird Survey.
Creative Commons Zero v1.0 Universal
29 stars 13 forks source link

install fails when build_vignettes is used #81

Closed chrischizinski closed 5 years ago

chrischizinski commented 5 years ago

devtools::install_github("trashbirdecology/bbsAssistant", force=TRUE, build_vignettes = TRUE)

devtools::install_github("trashbirdecology/bbsAssistant", force=TRUE, build_vignettes = TRUE) Downloading GitHub repo trashbirdecology/bbsAssistant@master ✔ checking for file ‘/private/var/folders/f9/_41zf4tn4dz6bzvqyrhpp1fjs58h7x/T/Rtmp1bBXTq/remotes6f332c1174dc/TrashBirdEcology-bbsAssistant-e3ed4d7/DESCRIPTION’ ... ─ preparing ‘bbsAssistant’: ✔ checking DESCRIPTION meta-information ... ─ installing the package to build vignettes E creating vignettes (10s) --- re-building ‘quick-overview.Rmd’ using rmarkdown Skipping install of 'bbsAssistant' from a github remote, the SHA1 (e3ed4d78) has not changed since last install. Use force = TRUE to force installation TERMS OF USE: North American Breeding Bird Survey Data:

Users of these BBS data are obligated to formally recognize their use of the program's data in publications, presentations and other outlets. Additionally, all work using these data should acknowledge the thousands of U.S. and Canadian participants who annually perform and coordinate the survey. It is in the best interest for the continued success of the BBS that authors submit a reprint or pdf of their work featuring BBS data to the National BBS staff for inclusion in the program's bibliography. If a publication is based solely on the analysis of BBS data, we recommend that you involve National BBS staff with the writing and/or review of the manuscript.

DATA LIABILITY DISCLAIMER: North American Breeding Bird Survey DataThis database, identified as the North American Breeding Bird Survey Dataset,has been approved for release and publication by the U.S. Geological Survey (USGS)and the Canadian Wildlife Service of Environment Canada (EC). Although this databasehas been subjected to rigorous review and is substantially complete, the USGS and ECreserve the right to revise the data pursuant to further analysis and review.Furthermore, it is released on the condition that the USGS, the U.S. Government,the EC, and the Canadian Government may not be held liable for any damages resulting from its authorized or unauthorized use. Warning in dir.create(bbsDir) : '/private/var/folders/f9/_41zf4tn4dz6bzvqyrhpp1fjs58h7x/T/RtmpEHusTt/Rbuild6f6e28359967/bbsAssistant/raw-data' already exists Loading required package: dplyr

Attaching package: 'dplyr'

The following objects are masked from 'package:stats':

   filter, lag

The following objects are masked from 'package:base':

   intersect, setdiff, setequal, union

Quitting from lines 49-54 (quick-overview.Rmd) Error: processing vignette 'quick-overview.Rmd' failed with diagnostics: No files to import. If state.names is specified, please ensure files exist in data.dir. --- failed re-building ‘quick-overview.Rmd’

SUMMARY: processing the following file failed: ‘quick-overview.Rmd’

Error: Vignette re-building failed. Execution halted Error: Failed to install 'bbsAssistant' from GitHub: System command error, exit status: 1, stdout + stderr (last 10 lines): E> Quitting from lines 49-54 (quick-overview.Rmd) E> Error: processing vignette 'quick-overview.Rmd' failed with diagnostics: E> No files to import. If state.names is specified, please ensure files exist in data.dir. E> --- failed re-building ‘quick-overview.Rmd’ E> E> SUMMARY: processing the following file failed: E> ‘quick-overview.Rmd’ E> E> Error: Vignette re-building failed. E> Execution halted

trashbirdecology commented 5 years ago

Thanks @chrischizinski.

The functions were not appearing as exports in the NAMESPACE & the .bib was misspecified in the vignette (the .bib filename should appear below the bibliography:, and after two spaces and an -. minor but critical...

I resolve this by first:

  1. devtools::load_all()
  2. devtools::document()
  3. building package
trashbirdecology commented 5 years ago

Running devtools::install_github("trashbirdecology/bbsassistant", force=TRUE, build_vignettes = TRUE) in a clean session works for me but please let me know if this does not for you!!

I cannot figure it out, but the vignette builds fine by knitting locally, but not during install. I think this has something to do with the internet connection to PWRC via line 180 (get_analysis_results(analysis = "annual.inds.2016"). I put eval = FALSE in this and the following (plot) chunk

trashbirdecology commented 5 years ago

I have opened up a new issue which addresses the .bib issue in the vignette: https://github.com/TrashBirdEcology/bbsAssistant/issues/84