- using R Under development (unstable) (2025-12-18 r89199)
- using platform: x86_64-pc-linux-gnu
- R was compiled by
gcc-15 (Debian 15.2.0-11) 15.2.0
GNU Fortran (Debian 15.2.0-11) 15.2.0
- running under: Debian GNU/Linux forky/sid
- using session charset: UTF-8
- checking for file ‘expss/DESCRIPTION’ ... OK
- checking extension type ... Package
- this is package ‘expss’ version ‘0.11.7’
- checking CRAN incoming feasibility ... [1s/1s] OK
- checking package namespace information ... OK
- checking package dependencies ... OK
- checking if this is a source package ... OK
- checking if there is a namespace ... OK
- checking for executable files ... OK
- checking for hidden files and directories ... OK
- checking for portable file names ... OK
- checking for sufficient/correct file permissions ... OK
- checking whether package ‘expss’ can be installed ... OK
See the install log for details.
- checking package directory ... OK
- checking for future file timestamps ... OK
- checking ‘build’ directory ... OK
- checking DESCRIPTION meta-information ... OK
- checking top-level files ... OK
- checking for left-over files ... OK
- checking index information ... OK
- checking package subdirectories ... OK
- checking code files for non-ASCII characters ... OK
- checking R files for syntax errors ... OK
- checking whether the package can be loaded ... [1s/1s] OK
- checking whether the package can be loaded with stated dependencies ... [0s/1s] OK
- checking whether the package can be unloaded cleanly ... [0s/1s] OK
- checking whether the namespace can be loaded with stated dependencies ... [0s/1s] OK
- checking whether the namespace can be unloaded cleanly ... [1s/1s] OK
- checking loading without being on the library search path ... [1s/1s] OK
- checking whether startup messages can be suppressed ... [1s/1s] OK
- checking use of S3 registration ... OK
- checking dependencies in R code ... OK
- checking S3 generic/method consistency ... OK
- checking replacement functions ... OK
- checking foreign function calls ... OK
- checking R code for possible problems ... [24s/28s] OK
- checking Rd files ... [1s/1s] OK
- checking Rd metadata ... OK
- checking Rd line widths ... OK
- checking Rd cross-references ... OK
- checking for missing documentation entries ... OK
- checking for code/documentation mismatches ... OK
- checking Rd \usage sections ... OK
- checking Rd contents ... OK
- checking for unstated dependencies in examples ... OK
- checking contents of ‘data’ directory ... OK
- checking data for non-ASCII characters ... [0s/0s] OK
- checking LazyData ... OK
- checking data for ASCII and uncompressed saves ... OK
- checking installed files from ‘inst/doc’ ... OK
- checking files in ‘vignettes’ ... OK
- checking examples ... [3s/3s] ERROR
Running examples in ‘expss-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: if_na
> ### Title: Replace values with NA and vice-versa
> ### Aliases: if_na if_na<- %if_na% na_if na_if<- %na_if% mis_val mis_val<-
> ### %mis_val% valid
> ### Keywords: datasets
>
> ### ** Examples
>
> # simple case
> a = c(NA, 2, 3, 4, NA)
> if_na(a, 99)
[1] 99 2 3 4 99
>
> # the same result
> a %if_na% 99
[1] 99 2 3 4 99
>
> # with label
> a = c(NA, 2, 3, 4, NA)
> if_na(a, 99, label = "Hard to say")
VALUES:
99, 2, 3, 4, 99
VALUE LABELS:
99 Hard to say
>
> # in-place replacement. The same result:
> if_na(a, label = "Hard to say") = 99
> a # c(99, 2, 3, 4, 99)
VALUES:
99, 2, 3, 4, 99
VALUE LABELS:
99 Hard to say
>
> # replacement with values from other variable
> a = c(NA, 2, 3, 4, NA)
> b = 1:5
> if_na(a, b)
[1] 1 2 3 4 5
>
> # replacement with group means
> # make data.frame
> set.seed(123)
> group = sample(1:3, 30, replace = TRUE)
> param = runif(30)
> param[sample(30, 10)] = NA # place 10 NA's
> df = data.frame(group, param)
>
> # replace NA's with group means
> if_na(df$param) = window_fun(df$param, df$group, mean_col)
Error in `[.data.table`(dt_table, , `:=`(res, eval(expr)), by = grouping_names) :
attempt access index 2/2 in VECTOR_ELT
Calls: window_fun -> window_fun.default -> [ -> [.data.table
Execution halted
- checking for unstated dependencies in ‘tests’ ... OK
- checking tests ... [27s/31s] ERROR
Running ‘testthat.R’ [27s/30s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> if(capabilities('long.double')){
+ library(testthat)
+ library(expss)
+ options(covr = FALSE)
+ options(width = 1000)
+ data.table::setDTthreads(2)
+ testthat::test_check("expss")
+ }
Loading required package: maditr
To aggregate several columns with one summary: take(mtcars, mpg, hp, fun = mean, by = am)
Use 'expss_output_rnotebook()' to display tables inside R Notebooks.
To return to the console output, use 'expss_output_default()'.
Attaching package: 'expss'
The following objects are masked from 'package:testthat':
equals, not
VALUES:
27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24... 50 items printed out of 52
VALUE LABELS:
1 A
2 B
3 C
4 D
5 E
6 F
7 G
8 H
9 I
10 J
...
43 q
44 r
45 s
46 t
47 u
48 v
49 w
50 x
51 y
52 z
Saving _problems/test_window_fun-13.R
[ FAIL 1 | WARN 0 | SKIP 15 | PASS 1569 ]
══ Skipped tests (15) ══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
• empty test (15): , , , , , , , , , , , , , ,
══ Failed tests ════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
── Error ('test_window_fun.R:13:1'): (code run outside of `test_that()`) ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Error in ``[.data.table`(dt_table, , `:=`(res, eval(expr)), by = grouping_names)`: attempt access index 2/2 in VECTOR_ELT
Backtrace:
▆
1. ├─testthat::expect_identical(window_fun(1:3, "total", mean), ave(1:3)) at test_window_fun.R:13:1
2. │ └─testthat::quasi_label(enquo(object), label)
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─expss::window_fun(1:3, "total", mean)
5. └─expss:::window_fun.default(1:3, "total", mean)
6. ├─dt_table[, `:=`(res, eval(expr)), by = grouping_names]
7. └─data.table:::`[.data.table`(...)
[ FAIL 1 | WARN 0 | SKIP 15 | PASS 1569 ]
Error:
! Test failures.
Execution halted
- checking for unstated dependencies in vignettes ... OK
- checking package vignettes ... OK
- checking re-building of vignette outputs ... [40s/50s] OK
- checking PDF version of manual ... [7s/10s] OK
- checking HTML version of manual ... [4s/6s] OK
- checking for non-standard things in the check directory ... OK
- DONE
Status: 2 ERRORs