mirror of
https://github.com/msberends/AMR.git
synced 2024-12-25 07:26:12 +01:00
ci for devel and freq fix
This commit is contained in:
parent
ce68ff4ee7
commit
56d4b4719f
@ -81,16 +81,16 @@ R-devel:
|
|||||||
image: rocker/r-devel
|
image: rocker/r-devel
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
script:
|
script:
|
||||||
- Rscript -e 'sessionInfo()'
|
- Rscriptdevel -e 'sessionInfo()'
|
||||||
# install missing and outdated packages
|
# 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
|
# remove vignettes folder and get VignetteBuilder field out of DESCRIPTION file
|
||||||
- rm -rf vignettes
|
- 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
|
# 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)
|
- 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:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- '*.Rcheck/*'
|
- '*.Rcheck/*'
|
||||||
|
7
R/freq.R
7
R/freq.R
@ -391,9 +391,10 @@ frequency_tbl <- function(x,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (NROW(x) > 0 & any(class(x) == "mo")) {
|
if (NROW(x) > 0 & any(class(x) == "mo")) {
|
||||||
header_list$families <- x %>% mo_family() %>% n_distinct()
|
x_mo <- as.mo(x) # do it once for all three
|
||||||
header_list$genera <- x %>% mo_genus() %>% n_distinct()
|
header_list$families <- x_mo %>% mo_family() %>% n_distinct()
|
||||||
header_list$species <- x %>% mo_species() %>% 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)) {
|
if (NROW(x) > 0 & any(class(x) == "difftime") & !is.hms(x)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user