Devtools :: test () works, but devtools :: check () does not. What for?

I am testing this package R

The following three things work just fine:

However, the following things

  • devtools::check()
  • devtools::build_win()# (see win-builder output here )

produce this error:

R CMD test results 1 error | 0 warnings | 0 notes that checking tests ... ERROR Running 'testthat.R Running tests in' tests / testthat.R failed. The last 13 lines of output: 40: mutate_.data.frame (., City_pop = ~ readr :: parse_number (Population..4), metro_pop = ~ readr :: parse_number (Population..5), urban_pop = ~ readr :: parse_number (Population..6), Country = ~ gsub (",", "_", Country)) 41: mutate (.data ,! (! (! Dots))) 42: mutate.data.frame (.data, ! (! (! dots))) 43: as.data.frame (mutate (tbl_df (.data), ...)) 44: mutate (tbl_df (.data), ...) 45: mutate.tbl_df ( tbl_df (.data), ...) 46: mutate_impl (.data, dots) testthat Results ============================= ===== ===================================== OK: 34 skipped: 0 failed: 1 1. Error: city works (@ test-etl.R # 113) Error: testthat unit tests failed execution stopped

, Travis-CI dplyr dplyr readr, Travis-CI . ( , .)

, , , .

, , , - /NAMESPACE , .,

? Ubuntu R 3.4.1.

MWE

# shell
git clone git@github.com:beanumber/etl.git
# R
library(devtools)
test()
check()
+18
2

, ( , , " "), package_name :: function(), , .

:

library(dplyr)
library(plyr)


df <- data.frame(a=rnorm(10), b = c(rep("a",5),rep("b",5)))
df %>% group_by(b) %>% summarise(mean_value = mean(a), count = n())

dplyr :: sumrize() ( ).

, , , , . , dplyr : : base: intersect, setdiff, setequal, union

, , / . , union base :: union, union() dplyr. , - , .

,

0

, . devtools::test load_all, . , devtools::check tarball R tarball . - .

, , , , , pkgname: .

0

Source: https://habr.com/ru/post/1686085/


All Articles