ci for devel and freq fix

This commit is contained in:
dr. M.S. (Matthijs) Berends 2019-03-29 21:45:46 +01:00
parent ce68ff4ee7
commit 56d4b4719f
2 changed files with 9 additions and 8 deletions

View File

@ -81,16 +81,16 @@ R-devel:
image: rocker/r-devel
allow_failure: true
script:
- Rscript -e 'sessionInfo()'
- Rscriptdevel -e 'sessionInfo()'
# install missing and outdated packages
- Rscript -e 'source(".gitlab-ci.R"); gl_update_pkg_all(repos = "https://cran.rstudio.com", quiet = TRUE, install_pkgdown = TRUE)'
- Rscriptdevel -e 'source(".gitlab-ci.R"); gl_update_pkg_all(repos = "https://cran.rstudio.com", quiet = TRUE, install_pkgdown = TRUE)'
# remove vignettes folder and get VignetteBuilder field out of DESCRIPTION file
- rm -rf vignettes
- Rscript -e 'd <- read.dcf("DESCRIPTION"); d[, colnames(d) == "VignetteBuilder"] <- NA; write.dcf(d, "DESCRIPTION")'
- Rscriptdevel -e 'd <- read.dcf("DESCRIPTION"); d[, colnames(d) == "VignetteBuilder"] <- NA; write.dcf(d, "DESCRIPTION")'
# build package
- R CMD build . --no-build-vignettes --no-manual
- Rdevel CMD build . --no-build-vignettes --no-manual
- PKG_FILE_NAME=$(ls -1t *.tar.gz | head -n 1)
- R CMD check "${PKG_FILE_NAME}" --no-build-vignettes --no-manual --as-cran
- Rdevel CMD check "${PKG_FILE_NAME}" --no-build-vignettes --no-manual --as-cran
artifacts:
paths:
- '*.Rcheck/*'

View File

@ -391,9 +391,10 @@ frequency_tbl <- function(x,
}
if (NROW(x) > 0 & any(class(x) == "mo")) {
header_list$families <- x %>% mo_family() %>% n_distinct()
header_list$genera <- x %>% mo_genus() %>% n_distinct()
header_list$species <- x %>% mo_species() %>% n_distinct()
x_mo <- as.mo(x) # do it once for all three
header_list$families <- x_mo %>% mo_family() %>% n_distinct()
header_list$genera <- x_mo %>% mo_genus() %>% n_distinct()
header_list$species <- x_mo %>% mo_species() %>% n_distinct()
}
if (NROW(x) > 0 & any(class(x) == "difftime") & !is.hms(x)) {