CRAN Package Check Results for Maintainer ‘Brodie Gaslam <brodie.gaslam at yahoo.com>’

Last updated on 2024-06-14 13:56:44 CEST.

Package ERROR NOTE OK
diffobj 13
fansi 1 12
oshka 13
unitizer 13
vetr 3 2 8

Package diffobj

Current CRAN status: OK: 13

Package fansi

Current CRAN status: ERROR: 1, OK: 12

Version: 1.0.6
Check: re-building of vignette outputs
Result: ERROR Error(s) in re-building vignettes: ... --- re-building ‘sgr-in-rmd.Rmd’ using rmarkdown Error: processing vignette 'sgr-in-rmd.Rmd' failed with diagnostics: there is no package called ‘R6’ --- failed re-building ‘sgr-in-rmd.Rmd’ SUMMARY: processing the following file failed: ‘sgr-in-rmd.Rmd’ Error: Vignette re-building failed. Execution halted Flavor: r-release-macos-arm64

Package oshka

Current CRAN status: NOTE: 13

Version: 0.1.2
Check: LazyData
Result: NOTE 'LazyData' is specified without a 'data' directory Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64, r-patched-linux-x86_64, r-release-linux-x86_64, r-release-macos-arm64, r-release-macos-x86_64, r-release-windows-x86_64, r-oldrel-macos-arm64, r-oldrel-macos-x86_64, r-oldrel-windows-x86_64

Package unitizer

Current CRAN status: OK: 13

Package vetr

Current CRAN status: ERROR: 3, NOTE: 2, OK: 8

Version: 0.2.16
Check: compiled code
Result: NOTE File ‘vetr/libs/vetr.so’: Found non-API call to R: ‘SETLENGTH’ Compiled code should not call non-API entry points in R. See ‘Writing portable packages’ in the ‘Writing R Extensions’ manual. Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc

Version: 0.2.16
Check: tests
Result: ERROR Running ‘run.R’ [29s/47s] Running the tests in ‘tests/run.R’ failed. Complete output: > cat(getwd(), "\n") /home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/vetr.Rcheck/tests > if(suppressWarnings(require('unitizer'))) { + local({ + suppressWarnings(RNGversion("3.5.2")); + on.exit({ + RNGversion(as.character(getRversion())) + }) + pattern <- 'alike' + unitize_dir( + 'unitizer', + # pattern=pattern, + state='recommended' + ) + }) + } else { + warning("Cannot run tests without package `unitizer`") + } Loading required package: unitizer State tracking is disabled by default to comply with CRAN policies. Add `options(unitizer.state='suggested')` to your 'Rprofile' file to enable, or `options(unitizer.state='off')` to quash this message without enabling. Prior to enabling, be sure to read `?unitizerState`,in particular the 'CRAN non-compliance' section. Preloads... Loading unitizer data... Parsing tests... Parsing unitizer/abstract.R Parsing unitizer/alike.R Parsing unitizer/all-bw.R Parsing unitizer/classes.R Parsing unitizer/cstringr.R Parsing unitizer/eval.R Parsing unitizer/internal.R Parsing unitizer/language.R Parsing unitizer/misc.R Parsing unitizer/parse.R Parsing unitizer/tev.R Parsing unitizer/type.R Parsing unitizer/validate.R Parsing unitizer/validate.args.R Evaluating tests... 1/14 abstract.R: 1/14 abstract.R: library(vetr) 1/14 abstract.R: unitizer_sect("Standard Methods", { 1/14 abstract.R: abstract(1:10) integer(0) 1/14 abstract.R: abstract(list(a = 1:10, b = runif(10))) $a integer(0) $b numeric(0) 1/14 abstract.R: abstract(matrix(1:9, nrow = 3)) <0 x 0 matrix> 1/14 abstract.R: abstract(array(1:8, c(2, 2, 2), dimnames = list(letters[1:2], <0 x 0 x 0 array of integer> 1/14 abstract.R: list.arr <- replicate(8, list(1), simplify = FALSE) 1/14 abstract.R: dim(list.arr) <- rep(2, 3) 1/14 abstract.R: abstract(list.arr) <0 x 0 x 0 array of character> 1/14 abstract.R: abstract(list(1, NULL)) [[1]] numeric(0) [[2]] NULL 1/14 abstract.R: alike(abstract(iris), iris[1:10, ]) [1] TRUE 1/14 abstract.R: alike(abstract(iris), iris[1:10, 1:3]) [1] "`iris[1:10, 1:3]` should have 5 columns (has 3)" 1/14 abstract.R: alike(abstract(iris), transform(iris, Species = as.character(S [1] "`transform(iris, Species = as.character(Species))$Species` should be class \"factor\" (is \"character\")" 1/14 abstract.R: my.env <- new.env() 1/14 abstract.R: identical(my.env, abstract(my.env)) [1] TRUE 1/14 abstract.R: unitizer_sect("Time Series", { 1/14 abstract.R: y <- ts(runif(12), start = 1970, frequency = 12) 1/14 abstract.R: attr(abstract(y), "tsp") [1] 0 0 0 1/14 abstract.R: attr(abstract(y, "start"), "tsp") [1] 0.000 1970.917 12.000 1/14 abstract.R: attr(abstract(y, "end"), "tsp") [1] 1970 0 12 1/14 abstract.R: attr(abstract(y, "frequency"), "tsp") [1] 1970.000 1970.917 0.000 1/14 abstract.R: attr(abstract(y, c("start", "frequency")), "tsp") [1] 0.000 1970.917 0.000 1/14 abstract.R: abstract(y, "boom") Error in abstract.ts(y, "boom") : Argument `what` must be character with all values in c("start", "end", "frequency") Calls: local ... eval -> eval -> withVisible -> abstract -> abstract.ts 1/14 abstract.R: vetr:::abstract.ts(1:12) Error in vetr:::abstract.ts(1:12) : Argument `x` must have a "tsp" attribute that is numeric(3L) Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 1/14 abstract.R: unitizer_sect("s4", { 1/14 abstract.R: obj <- new("unitizerGlobalState") 1/14 abstract.R: abstract(obj) An object of class "unitizerGlobalState" Slot "search.path": NULL Slot "options": NULL Slot "working.directory": NULL Slot "random.seed": NULL Slot "namespaces": NULL 1/14 abstract.R: nullify(obj, 1) Error in as.list.default(obj) : no method for coercing this S4 class to a vector Error in nullify.default(obj, 1) : Could not coerce `obj` to list; see previous error. Calls: local ... eval -> eval -> withVisible -> nullify -> nullify.default 1/14 abstract.R: unitizer_sect("lm", { 1/14 abstract.R: set.seed(1) 1/14 abstract.R: df1 <- data.frame(x = runif(10), y = runif(10), z = runif(10)) 1/14 abstract.R: df2 <- data.frame(a = runif(5), b = runif(5), c = runif(5)) 1/14 abstract.R: mdl <- lm(y ~ x + poly(z, 2), df1) 1/14 abstract.R: alike(abstract(mdl), mdl) [1] TRUE 1/14 abstract.R: mdl2 <- lm(x ~ y + poly(z, 2), df1) 1/14 abstract.R: alike(abstract(mdl), mdl2) [1] TRUE 1/14 abstract.R: mdl3 <- lm(a ~ b + log(c), df2) 1/14 abstract.R: alike(abstract(mdl), mdl3) [1] "`mdl3$terms[[3]][[3]][[1]]` should be a call to `poly` (is a call to `log`)" 1/14 abstract.R: mdl4 <- lm(a ~ b, df2) 1/14 abstract.R: alike(abstract(mdl), mdl4) [1] "`mdl4$terms[[3]]` should be a call to `+` (is \"symbol\")" 1/14 abstract.R: unitizer_sect("nullify", { 1/14 abstract.R: nullify(list(1, 2, 3), 2) [[1]] [1] 1 [[2]] NULL [[3]] [1] 3 1/14 abstract.R: nullify(list(1, 2, 3), -2) Error in nullify.default(list(1, 2, 3), -2) : Argument `index` must be a valid subsetting index and if numeric must be greater than or equal to one. Calls: local ... eval -> eval -> withVisible -> nullify -> nullify.default 1/14 abstract.R: nullify(list(1, 2, 3, 4), c(TRUE, FALSE)) [[1]] NULL [[2]] [1] 2 [[3]] NULL [[4]] [1] 4 1/14 abstract.R: nullify(list(1, 2, 3, 4), c(TRUE, FALSE, FALSE)) Warning in nullify.default(list(1, 2, 3, 4), c(TRUE, FALSE, FALSE)) : Argument `obj` is not a multiple in length of argument `obj` [[1]] NULL [[2]] [1] 2 [[3]] [1] 3 [[4]] NULL 1/14 abstract.R: nullify(list(1, 2, 3, 4), c(rep(FALSE, 4), TRUE)) Error in nullify.default(list(1, 2, 3, 4), c(rep(FALSE, 4), TRUE)) : Argument `index` may be no longer than `obj` if it is logical. Calls: local ... eval -> eval -> withVisible -> nullify -> nullify.default 1/14 abstract.R: nullify(list(a = 1, b = 2, 3, 4), c("a", "b")) $a NULL $b NULL [[3]] [1] 3 [[4]] [1] 4 1/14 abstract.R: nullify(list(1, 2, 3, 4), "hello") Error in nullify.default(list(1, 2, 3, 4), "hello") : Argument `index` contains values not present in names of `obj` (hello). Calls: local ... eval -> eval -> withVisible -> nullify -> nullify.default 1/14 abstract.R: nullify(list(1, 2, 3), 4) Error in nullify.default(list(1, 2, 3), 4) : Argument `index` can only contain values that exist within seq_along(`obj`). Calls: local ... eval -> eval -> withVisible -> nullify -> nullify.default 1/14 abstract.R: iris.null <- nullify(iris[1:10, ], 4) 1/14 abstract.R: as.list(iris.null) $Sepal.Length [1] 5.1 4.9 4.7 4.6 5.0 5.4 4.6 5.0 4.4 4.9 $Sepal.Width [1] 3.5 3.0 3.2 3.1 3.6 3.9 3.4 3.4 2.9 3.1 $Petal.Length [1] 1.4 1.4 1.3 1.5 1.4 1.7 1.4 1.5 1.4 1.5 $Petal.Width NULL $Species [1] setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa Levels: setosa versicolor virginica 1/14 abstract.R: class(iris.null) [1] "data.frame" 1/14 abstract.R: nullify(letters, 5) [1] "a" "b" "c" "d" "NULL" "f" "g" "h" "i" "j" [11] "k" "l" "m" "n" "o" "p" "q" "r" "s" "t" [21] "u" "v" "w" "x" "y" "z" 1/14 abstract.R: nullify(structure(letters[1:2], class = "xqwer892jahaksdf"), Warning in nullify.default(structure(letters[1:2], class = "xqwer892jahaksdf"), : Unable to convert object back to class "xqwer892jahaksdf" [[1]] [1] "a" [[2]] NULL 2/14 alike.R: 2/14 alike.R: library(vetr) 2/14 alike.R: unitizer_sect("Atomic", { 2/14 alike.R: alike(integer(), 1:3) [1] TRUE 2/14 alike.R: alike(integer(5L), 1:3) [1] "`length(1:3)` should be 5 (is 3)" 2/14 alike.R: alike(integer(3L), 1:3) [1] TRUE 2/14 alike.R: alike(numeric(), c(1, 2, 3)) [1] TRUE 2/14 alike.R: alike(numeric(), 1L) [1] TRUE 2/14 alike.R: alike(numeric(), c(1.1, 0.053, 41.8)) [1] TRUE 2/14 alike.R: alike(integer(3L), 1:3 + 0.01) [1] "`1:3 + 0.01` should be type \"integer-like\" (is \"double\")" 2/14 alike.R: alike(integer(6L), seq(1/6, 1, 1/6) * 6) [1] "`seq(1/6, 1, 1/6) * 6` should be type \"integer-like\" (is \"double\")" 2/14 alike.R: alike(integer(4L), letters[1:4]) [1] "`letters[1:4]` should be type \"integer-like\" (is \"character\")" 2/14 alike.R: alike(letters[1:4], c("hello", "goodbye", "ba", "da")) [1] TRUE 2/14 alike.R: alike(integer(), NULL) [1] "`NULL` should be type \"integer-like\" (is \"NULL\")" 2/14 alike.R: alike(c(a = 1, b = 2), 3) [1] "`length(3)` should be 2 (is 1)" 2/14 alike.R: alike(c(a = 1, b = 2), c(1, 2)) [1] "`c(1, 2)` should have attribute \"names\"" 2/14 alike.R: unitizer_sect("lists", { 2/14 alike.R: lst <- list(list(1, 2), list(3, list(4, list(5, list(6, 6.1, 2/14 alike.R: lst.2 <- list(list(11, 21), list(31, list(41, list(51, list(61))) 2/14 alike.R: alike(lst, lst.2) [1] "`length(lst.2[[2]][[2]][[2]][[2]])` should be 3 (is 1)" 2/14 alike.R: lst.3 <- lst.2 2/14 alike.R: lst.3[[2]][[2]][[2]][[2]] <- matrix(1:9, nrow = 3) 2/14 alike.R: alike(lst, lst.3) [1] "`lst.3[[2]][[2]][[2]][[2]]` should be type \"list\" (is \"integer\")" 2/14 alike.R: alike(1:10, "hello") [1] "`\"hello\"` should be type \"integer-like\" (is \"character\")" 2/14 alike.R: alike(lst, lst) [1] TRUE 2/14 alike.R: lst.4 <- lst 2/14 alike.R: lst.4[[2]][[2]] <- list() 2/14 alike.R: alike(lst.4, lst) [1] TRUE 2/14 alike.R: alike(lst, lst.4) [1] "`length(lst.4[[2]][[2]])` should be 2 (is 0)" 2/14 alike.R: lst.5 <- list(1, list(a = 1, b = 2, c = list(d = 1))) 2/14 alike.R: lst.6 <- list(1, list(a = 1, b = 2, c = list(d = "hello"))) 2/14 alike.R: lst.5.1 <- list(1, list(a = 1, b = 2, `c d` = list(d = 1))) 2/14 alike.R: lst.6.1 <- list(1, list(a = 1, b = 2, `c d` = list(d = "hello"))) 2/14 alike.R: alike(lst.5, lst.6) [1] "`lst.6[[2]]$c$d` should be type \"numeric\" (is \"character\")" 2/14 alike.R: alike(lst.6, lst.5) [1] "`lst.5[[2]]$c$d` should be type \"character\" (is \"double\")" 2/14 alike.R: alike(lst.5.1, lst.6.1) [1] "{lst.6.1[[2]]$`c d`$d} should be type \"numeric\" (is \"character\")" 2/14 alike.R: alike(lst.6.1, lst.5.1) [1] "{lst.5.1[[2]]$`c d`$d} should be type \"character\" (is \"double\")" 2/14 alike.R: alike(pairlist(a = 1, b = "character"), pairlist(a = 1, b = lette [1] "`length(pairlist(a = 1, b = letters)$b)` should be 1 (is 26)" 2/14 alike.R: alike(pairlist(1, "character"), pairlist(1, letters)) [1] "`length(pairlist(1, letters)[[2]])` should be 1 (is 26)" 2/14 alike.R: unitizer_sect("NULL values as wildcards", { 2/14 alike.R: alike(NULL, 1:3) [1] "`1:3` should be `NULL` (is \"integer\")" 2/14 alike.R: alike(list(NULL), list(1:3)) [1] TRUE 2/14 alike.R: alike(list(NULL, NULL), list(list(list(1, 2, 3)), 1:25)) [1] TRUE 2/14 alike.R: alike(list(NULL), list(1, 2)) [1] "`length(list(1, 2))` should be 1 (is 2)" 2/14 alike.R: alike(list(), list(1, 2)) [1] TRUE 2/14 alike.R: unitizer_sect("Matrix / Arrays", { 2/14 alike.R: alike(matrix(integer(), ncol = 7), matrix(1:21, nrow = 3)) [1] TRUE 2/14 alike.R: alike(matrix(integer(), nrow = 3), matrix(1:21, nrow = 3)) [1] TRUE 2/14 alike.R: alike(matrix(character(), nrow = 3), matrix(1:21, nrow = 3)) [1] "`matrix(1:21, nrow = 3)` should be type \"character\" (is \"integer\")" 2/14 alike.R: alike(matrix(integer(), nrow = 4), matrix(1:21, nrow = 3)) [1] "`matrix(1:21, nrow = 3)` should have 4 rows (has 3)" 2/14 alike.R: alike(matrix(integer(), ncol = 3, dimnames = list(NULL, c("R", [1] TRUE 2/14 alike.R: alike(matrix(integer(), nrow = 3, dimnames = list(c("R", "G", [1] "`matrix(1:21, ncol = 3, dimnames = list(NULL, c(\"R\", \"G\", \"B\")))` should have 3 rows (has 7)" 2/14 alike.R: alike(matrix(integer(), nrow = 3, dimnames = list(c("R", "G", [1] "row.names(matrix(1:9, nrow = 3, dimnames = list(NULL, c(\"R\", \n \"G\", \"B\"))))\nshould be type \"character\" (is \"NULL\")" 2/14 alike.R: alike(matrix(integer(), nrow = 3, dimnames = list(c("R", "G", [1] TRUE 2/14 alike.R: alike(matrix(1:9, nrow = 3), 1:9) [1] "`1:9` should be \"matrix\" (is \"integer\")" 2/14 alike.R: mx.tpl <- matrix(integer(), ncol = 3, dimnames = list(row.id = NU 2/14 alike.R: mx.cur <- matrix(sample(0:255, 12), ncol = 3, dimnames = list(row 2/14 alike.R: mx.cur2 <- matrix(sample(0:255, 12), ncol = 3, dimnames = list(1: 2/14 alike.R: alike(mx.tpl, mx.cur) [1] TRUE 2/14 alike.R: alike(mx.tpl, mx.cur2) [1] "`dimnames(mx.cur2)` should have attribute \"names\"" 2/14 alike.R: unitizer_sect("Data Frames", { 2/14 alike.R: alike(mtcars, 1:3) [1] "`1:3` should be class \"data.frame\" (is \"integer\")" 2/14 alike.R: alike(1:3, mtcars) [1] "`mtcars` should be type \"integer-like\" (is \"list\")" 2/14 alike.R: alike(data.frame(), data.frame(a = 1:3, b = letters[1:3])) [1] TRUE 2/14 alike.R: (alike)(data.frame(a = integer(), b = factor()), data.frame(a = 1 [1] TRUE 2/14 alike.R: alike(data.frame(a = factor(), b = factor()), data.frame(a = 1:3, [1] "`data.frame(a = 1:3, b = letters[1:3])$a` should be class \"factor\" (is \"integer\")" 2/14 alike.R: alike(list(NULL, structure("a", class = "x")), list(NULL, structu [1] "`list(NULL, structure(\"a\", class = \"y\"))[[2]]` should be class \"x\" (is \"y\")" 2/14 alike.R: alike(list(integer(), data.frame(a = integer(), b = numeric()), [1] TRUE 2/14 alike.R: df.tpl <- structure(list(1:4, factor(LETTERS[1:4], levels = LETTE 2/14 alike.R: df.cur <- `row.names<-`(data.frame(id = 5:8, val = factor(LETTERS 2/14 alike.R: df.cur2 <- `row.names<-`(data.frame(id = 5:8, val = factor(LETTER 2/14 alike.R: alike(df.tpl, df.cur) [1] TRUE 2/14 alike.R: alike(df.cur, df.tpl) [1] "`names(df.tpl)[2]` should be \"val\" (is \"\")" 2/14 alike.R: alike(df.tpl, df.cur2) [1] "`row.names(df.cur2)[1]` should be \"one\" (is \"uno\")" 2/14 alike.R: df.tpl <- structure(list(1:4, letters[1:4]), names = c("id", 2/14 alike.R: df.cur <- structure(list(1:4, letters[1:4]), names = c("id", 2/14 alike.R: alike(df.tpl, df.tpl) [1] TRUE 2/14 alike.R: alike(df.tpl, df.cur) [1] "`names(df.cur)[2]` should be \"NA\" (is \"val\")" 2/14 alike.R: alike(mtcars, iris) [1] "`iris` should have 11 columns (has 5)" 2/14 alike.R: alike(mtcars, mtcars[1:10, ]) [1] "`mtcars[1:10, ]` should have 32 rows (has 10)" 2/14 alike.R: alike(mtcars[-5], mtcars) [1] "`mtcars` should have 10 columns (has 11)" 2/14 alike.R: unitizer_sect("Time Series", { 2/14 alike.R: ts.1 <- ts(runif(24), 1970, frequency = 12) 2/14 alike.R: ts.2 <- ts(runif(24), 1970, frequency = 4) 2/14 alike.R: ts.3 <- abstract(ts.1, "end") 2/14 alike.R: ts.4 <- abstract(ts.2, "frequency") 2/14 alike.R: alike(ts.1, ts.2) [1] "`tsp(ts.2)[2]` should be 1971.92 (is 1975.75)" 2/14 alike.R: alike(ts.3, ts.1) [1] TRUE 2/14 alike.R: alike(ts.1, ts.3) [1] "`tsp(ts.3)[2]` should be 1971.92 (is 0)" 2/14 alike.R: alike(ts.3, ts.2) [1] "`tsp(ts.2)[3]` should be 12 (is 4)" 2/14 alike.R: ts.5 <- ts(matrix(runif(24 * 3), ncol = 3), 1970, frequency = 12) 2/14 alike.R: ts.6 <- ts(matrix(runif(12 * 3), ncol = 3), 1970, frequency = 12) 2/14 alike.R: alike(ts.5, ts.6) [1] "`tsp(ts.6)[2]` should be 1971.92 (is 1970.92)" 2/14 alike.R: alike(ts.5, matrix(runif(24 * 3), ncol = 3)) [1] "`matrix(runif(24 * 3), ncol = 3)` should be class \"mts\" (is \"numeric\")" 2/14 alike.R: unitizer_sect("Factors", { 2/14 alike.R: f1 <- factor(letters[1:5]) 2/14 alike.R: f2 <- factor(letters[1:5], levels = letters[5:1]) 2/14 alike.R: f3 <- f1 2/14 alike.R: levels(f3)[[5]] <- "" 2/14 alike.R: f4 <- factor(c(letters[1:4], "f")) 2/14 alike.R: alike(f1, f2) [1] "`levels(f2)[1]` should be \"a\" (is \"e\")" 2/14 alike.R: alike(f1, f3) [1] "`levels(f3)[5]` should be \"e\" (is \"\")" 2/14 alike.R: alike(f1, f4) [1] "`levels(f4)[5]` should be \"e\" (is \"f\")" 2/14 alike.R: alike(f3, f1) [1] TRUE 2/14 alike.R: alike(f3, f4) [1] TRUE 2/14 alike.R: unitizer_sect("Environments / Pairlists", { 2/14 alike.R: env0 <- new.env() 2/14 alike.R: env1 <- list2env(list(a = character(), b = list(), c = NULL)) 2/14 alike.R: env2 <- list2env(list(a = "hello", b = iris, c = matrix(1:3))) 2/14 alike.R: env3 <- list2env(list(a = "hello", b = iris)) 2/14 alike.R: env4 <- list2env(list(a = "hello", b = iris, c = logical(1L), 2/14 alike.R: env5 <- list2env(list(b = iris, a = "hello", c = matrix(1:3))) 2/14 alike.R: alike(env0, env2) [1] TRUE 2/14 alike.R: alike(env1, env2) [1] TRUE 2/14 alike.R: alike(env1, env3) [1] "`env3` should contain variable `c`" 2/14 alike.R: alike(env3, env1) [1] "`length(env1$a)` should be 1 (is 0)" 2/14 alike.R: alike(env1, env4) [1] TRUE 2/14 alike.R: alike(env1, env5) [1] TRUE 2/14 alike.R: rec.env <- rec.env.cpy <- new.env() 2/14 alike.R: for (i in 1:50) { 2/14 alike.R: rec.env.cpy$a <- rec.env 2/14 alike.R: alike(rec.env, rec.env) [1] TRUE 2/14 alike.R: plst1 <- pairlist(a = character(), b = list(), c = NULL) 2/14 alike.R: plst2 <- pairlist(a = "hello", b = iris, c = matrix(1:3)) 2/14 alike.R: plst3 <- pairlist(a = "hello", b = iris) 2/14 alike.R: plst4 <- pairlist(a = "hello", b = iris, c = logical(1L), d = log 2/14 alike.R: plst5 <- pairlist(a = character(), b = list(), integer()) 2/14 alike.R: plst6 <- pairlist(a = character(), b = list(), boogey = 1:3) 2/14 alike.R: plst7 <- pairlist(a = character(), boogey = 1:3, b = list()) 2/14 alike.R: alike(plst1, plst2) [1] TRUE 2/14 alike.R: alike(plst1, plst3) [1] "`length(plst3)` should be 3 (is 2)" 2/14 alike.R: alike(plst1, plst4) [1] "`length(plst4)` should be 3 (is 4)" 2/14 alike.R: alike(plst1, plst5) [1] "`names(plst5)[[3L]]` should be \"c\" (is \"\")" 2/14 alike.R: alike(plst5, plst6) [1] TRUE 2/14 alike.R: alike(plst5, plst7) [1] "`names(plst7)[[2L]]` should be \"b\" (is \"boogey\")" 2/14 alike.R: env7 <- list2env(list(a = character(), b = plst1)) 2/14 alike.R: env8 <- list2env(list(a = letters[1:3], b = plst2)) 2/14 alike.R: env9 <- list2env(list(a = letters[1:3], b = plst5)) 2/14 alike.R: alike(env7, env8) [1] TRUE 2/14 alike.R: alike(env7, env9) [1] "`names(env9$b)[[3L]]` should be \"c\" (is \"\")" 2/14 alike.R: env.nest.1 <- env.nest.1.cpy <- new.env() 2/14 alike.R: env.nest.2 <- env.nest.2.cpy <- new.env() 2/14 alike.R: for (i in 1:26) { 2/14 alike.R: alike(env.nest.1, env.nest.2, settings = vetr_settings(env.depth. Warning in alike(env.nest.1, env.nest.2, settings = vetr_settings(env.depth.max = 16)) : `alike` environment stack exhausted at recursion depth 16; unable to recurse any further into environments; see `env.depth.max` parameter for `vetr_settings`. [1] TRUE 2/14 alike.R: alike(.GlobalEnv, env.nest.1) [1] "`env.nest.1` should be the global environment" 2/14 alike.R: unitizer_sect("Calls / Formulas", { 2/14 alike.R: alike(quote(1 + 1), quote(x + y)) [1] "`quote(x + y)[[2]]` should be \"double\" (is \"symbol\")" 2/14 alike.R: alike(quote(fun(1 + 1)), quote(fun(x + y, 9))) [1] "`quote(fun(x + y, 9))[[2]][[2]]` should be \"double\" (is \"symbol\")" 2/14 alike.R: alike(quote(fun(x + y, 9)), quote(fun(1 + 1))) [1] "`quote(fun(1 + 1))[[2]][[2]]` should be \"symbol\" (is \"double\")" 2/14 alike.R: "%plusq%" <- function(x, y) call("+", substitute(x), substitute(y 2/14 alike.R: alike(quote(1 + 1), 1 %plusq% b) [1] "`(1 %plusq% b)[[3]]` should be \"double\" (is \"symbol\")" 2/14 alike.R: fun <- function(a, b, c) NULL 2/14 alike.R: alike(quote(fun(b = fun2(x, y), 1, 3)), quote(fun(NULL, fun2(a, [1] TRUE 2/14 alike.R: (alike)(quote(fun(b = fun2(x, y), 1, 3)), quote(fun(NULL, fun2(a, [1] "`quote(fun(NULL, fun2(a, b), 1))` should have argument `b` as first argument (has unnamed argument)" 2/14 alike.R: alike(quote(fun(b = fun2(x, y), 1, 3)), quote(fun(fun2(a, b), [1] "`quote(fun(fun2(a, b), NULL, 1))[[2]]` should be \"double\" (is \"language\")" 2/14 alike.R: alike(quote(fun(a = 1)), quote(fun(b = 1))) [1] "`quote(fun(b = 1))` should have argument `a` as first argument (has `b`)" 2/14 alike.R: alike(quote(fun(1, 2)), quote(fun(1))) [1] "`quote(fun(1))` should have 2 arguments (has 1)" 2/14 alike.R: alike(quote(fun(1)), quote(fun(1, 2))) [1] "`quote(fun(1, 2))` should have 1 arguments (has 2)" 2/14 alike.R: alike(quote(fun(1, 2)), quote(fun2(1, 2))) [1] "`quote(fun2(1, 2))[[1]]` should be a call to `fun` (is a call to `fun2`)" 2/14 alike.R: alike(quote(fun(1, fun2(3))), quote(fun(1, fun(3)))) [1] "`quote(fun(1, fun(3)))[[3]][[1]]` should be a call to `fun2` (is a call to `fun`)" 2/14 alike.R: alike(quote(fun()), quote(fun(a, b, c))) [1] TRUE 2/14 alike.R: alike(quote(fun()), quote(fun2(a, b, c))) [1] "`quote(fun2(a, b, c))[[1]]` should be a call to `fun` (is a call to `fun2`)" 2/14 alike.R: alike(quote(fun(a, fun2())), quote(fun(b, fun2(a, b, c)))) [1] TRUE 2/14 alike.R: c0 <- quote(fun(a, b, a, 25)) 2/14 alike.R: c0.1 <- c0.2 <- c0 2/14 alike.R: attr(c0.1, "blah") <- "hello" 2/14 alike.R: attr(c0.2, "blah") <- 1:3 2/14 alike.R: alike(c0, c0.1) [1] TRUE 2/14 alike.R: alike(c0.1, c0) [1] "`c0` should have attribute \"blah\"" 2/14 alike.R: alike(c0.1, c0.2) [1] "`attr(c0.2, \"blah\")` should be character (is integer)" 2/14 alike.R: alike(x ~ y, z ~ w) [1] TRUE 2/14 alike.R: alike(x ~ y, z ~ w + 1) [1] "`(z ~ w + 1)[[3]]` should be \"symbol\" (is \"language\")" 2/14 alike.R: alike(x ~ y + 2, z ~ w + 1) [1] "`(z ~ w + 1)[[3]][[3]]` should have identical constant values" 2/14 alike.R: alike(x ~ y + z:y, w ~ v + u:v) [1] TRUE 2/14 alike.R: alike(z ~ w + 1, x ~ y) [1] "`(x ~ y)[[3]]` should be a call to `+` (is \"symbol\")" 2/14 alike.R: alike(y ~ x^2 + x * z + z + w:z, q ~ l^2 + l * j + j + w:j) [1] TRUE 2/14 alike.R: alike(y ~ x^2 + x * z + z + w:z, q ~ l^3 + l * j + j + w:j) [1] "`(q ~ l^3 + l * j + j + w:j)[[3]][[2]][[2]][[2]][[3]]` should have identical constant values" 2/14 alike.R: exp.1 <- parse(text = "x + y; fun2(fun(1, 2, 3), z)", keep.source 2/14 alike.R: exp.2 <- parse(text = "z + 2; fun(fun2(1, 2, 3), q)", keep.source 2/14 alike.R: exp.3 <- parse(text = "z + fun(3); fun(fun2(a, b, c), 3)", keep.s 2/14 alike.R: alike(exp.1, exp.2) [1] "`exp.2[[1]][[3]]` should be \"symbol\" (is \"double\")" 2/14 alike.R: alike(exp.2, exp.3) [1] "`exp.3[[1]][[3]]` should be \"double\" (is \"language\")" 2/14 alike.R: alike(exp.3, exp.2) [1] "`exp.2[[1]][[3]]` should be a call to `fun` (is \"double\")" 2/14 alike.R: exp.4 <- expression(1 + 1, 2 + x) 2/14 alike.R: exp.5 <- expression(1 + 1, 5 + y) 2/14 alike.R: exp.6 <- expression(1 + 1, 2 + 2) 2/14 alike.R: alike(exp.4, exp.5) [1] TRUE 2/14 alike.R: alike(exp.4, exp.6) [1] "`exp.6[[2]][[3]]` should be \"symbol\" (is \"double\")" 2/14 alike.R: alike(quote(x), quote(y)) [1] TRUE 2/14 alike.R: alike(NULL, quote(x)) [1] "`quote(x)` should be `NULL` (is \"symbol\")" 2/14 alike.R: alike(quote((NULL)), quote(y)) [1] TRUE 2/14 alike.R: alike(quote(NULL), quote(x)) [1] "`quote(x)` should be `NULL` (is \"symbol\")" 2/14 alike.R: alike(quote(x), c0) [1] "`c0` should be \"symbol\" (is \"language\")" 2/14 alike.R: alike(c0, quote(x)) [1] "`quote(x)` should be a call to `fun` (is \"symbol\")" 2/14 alike.R: alike(quote((x)), quote(y)) [1] TRUE 2/14 alike.R: unitizer_sect("Functions", { 2/14 alike.R: alike(print, print.data.frame) [1] TRUE 2/14 alike.R: alike(print.data.frame, print) [1] "`print` should have argument `digits` after argument `...`" 2/14 alike.R: alike(`&&`, function() NULL) Error in alike(`&&`, function() NULL) : argument of type NILSXP is not a closure Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> alike 2/14 alike.R: fun <- fun2 <- function() NULL 2/14 alike.R: attributes(fun2) <- NULL 2/14 alike.R: alike(fun, fun2) [1] TRUE 2/14 alike.R: alike(fun, fun2, settings = vetr_settings(attr.mode = 2L)) [1] "`fun2` should have attribute \"srcref\"" 2/14 alike.R: alike(fun2, fun, settings = vetr_settings(attr.mode = 1L)) [1] TRUE 2/14 alike.R: alike(fun2, fun, settings = vetr_settings(attr.mode = 2L)) [1] "`fun` should not have attribute \"srcref\"" 2/14 alike.R: unitizer_sect("settings", { 2/14 alike.R: alike(1L, 1, settings = vetr_settings(type.mode = 1L)) [1] "`1` should be type \"integer\" (is \"double\")" 2/14 alike.R: alike(1, 1L, settings = vetr_settings(type.mode = 1L)) [1] TRUE 2/14 alike.R: alike(1, 1L, settings = vetr_settings(type.mode = 2L)) [1] "`1L` should be type \"double\" (is \"integer\")" 2/14 alike.R: alike(1:101, 1:101 + 0) [1] "`1:101 + 0` should be type \"integer\" (is \"double\")" 2/14 alike.R: alike(1:101, 1:101 + 0, settings = vetr_settings(fuzzy.int.max.le [1] TRUE 2/14 alike.R: alike(1:101, 1:101 + 0, settings = vetr_settings(fuzzy.int.max.le [1] TRUE 2/14 alike.R: alike(list(a = 1:10), data.frame(a = 1:10)) [1] TRUE 2/14 alike.R: alike(list(a = 1:10), data.frame(a = 1:10), settings = vetr_setti [1] TRUE 2/14 alike.R: alike(list(a = 1:10), data.frame(a = 1:10), settings = vetr_setti [1] "`data.frame(a = 1:10)` should not have attribute \"class\"" 2/14 alike.R: fun <- function(a, b, c) NULL 2/14 alike.R: call.a <- quote(fun(b = fun2(x, y), 1, 3)) 2/14 alike.R: call.b <- quote(fun(NULL, fun2(a, b), 1)) 2/14 alike.R: alike(call.a, call.b, settings = vetr_settings(env = emptyenv())) [1] "`call.b` should have argument `b` as first argument (has unnamed argument)" 2/14 alike.R: alike(call.a, call.b, env = emptyenv()) [1] "`call.b` should have argument `b` as first argument (has unnamed argument)" 2/14 alike.R: alike(call.a, call.b, env = emptyenv(), settings = vetr_settings( [1] TRUE 2/14 alike.R: alike(call.a, call.b) [1] TRUE 2/14 alike.R: alike(`&&`, function() NULL, settings = vetr_settings(type.mode = Error in alike(`&&`, function() NULL, settings = vetr_settings(type.mode = 1)) : argument of type NILSXP is not a closure Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> alike 2/14 alike.R: alike(1, 2, settings = letters) Error in alike(1, 2, settings = letters) : `vet/vetr` usage error: argument `settings` must be a list or NULL (is character). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> alike 2/14 alike.R: alike(1, 2, settings = list()) Error in alike(1, 2, settings = list()) : `vet/vetr` usage error: `settings` must be a list of length 16. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> alike 2/14 alike.R: alike(1, 2, settings = setNames(vector("list", 16), letters[1:16] Error in alike(1, 2, settings = setNames(vector("list", 16), letters[1:16])) : `vet/vetr` usage error: argument `settings` names are not in format produced by `vetr_settings`. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> alike 2/14 alike.R: alike(1, 2, settings = vector("list", 16)) Error in alike(1, 2, settings = vector("list", 16)) : `vet/vetr` usage error: argument `settings` must be a named list as produced by `vetr_settings`. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> alike 2/14 alike.R: unitizer_sect("Examples", { 2/14 alike.R: alike(1L, 1) [1] TRUE 2/14 alike.R: alike(1L, 1.1) [1] "`1.1` should be type \"integer-like\" (is \"double\")" 2/14 alike.R: alike(1.1, 1L) [1] TRUE 2/14 alike.R: alike(1:100, 1:100 + 0) [1] TRUE 2/14 alike.R: alike(1:101, 1:101 + 0) [1] "`1:101 + 0` should be type \"integer\" (is \"double\")" 2/14 alike.R: alike(integer(1L), 1) [1] TRUE 2/14 alike.R: alike(logical(1L), TRUE) [1] TRUE 2/14 alike.R: alike(integer(1L), 1:3) [1] "`length(1:3)` should be 1 (is 3)" 2/14 alike.R: alike(logical(1L), c(TRUE, TRUE)) [1] "`length(c(TRUE, TRUE))` should be 1 (is 2)" 2/14 alike.R: alike(integer(), 1:10) [1] TRUE 2/14 alike.R: alike(1:10, integer()) [1] "`length(integer())` should be 10 (is 0)" 2/14 alike.R: alike(list(integer(), list(character(), logical(1L))), list(1:10, [1] TRUE 2/14 alike.R: alike(list(integer(), list(character(), logical(1L))), list(1:10, [1] "`length(list(1:10, list(letters, c(TRUE, FALSE)))[[2]][[2]])` should be 1 (is 2)" 2/14 alike.R: alike(list(NULL, NULL), list(iris, mtcars)) [1] TRUE 2/14 alike.R: alike(NULL, mtcars) [1] "`mtcars` should be `NULL` (is \"list\")" 2/14 alike.R: iris.fake <- transform(iris, Species = as.character(Species)) 2/14 alike.R: alike(iris, iris.fake) [1] "`iris.fake$Species` should be class \"factor\" (is \"character\")" 2/14 alike.R: iris.fake2 <- transform(iris, Species = factor(Species, levels = 2/14 alike.R: alike(iris, iris.fake2) [1] "`levels(iris.fake2$Species)[3]` should be \"virginica\" (is \"americana\")" 2/14 alike.R: iris.tpl <- abstract(iris) 2/14 alike.R: str(iris.tpl) 'data.frame': 0 obs. of 5 variables: $ Sepal.Length: num $ Sepal.Width : num $ Petal.Length: num $ Petal.Width : num $ Species : Factor w/ 3 levels "setosa","versicolor",..: 2/14 alike.R: alike(iris.tpl, iris) [1] TRUE 2/14 alike.R: alike(iris.tpl, iris[sample(1:nrow(iris), 10), ]) [1] TRUE 2/14 alike.R: alike(iris.tpl, iris[c(2, 1, 3, 4, 5)]) [1] "`names(iris[c(2, 1, 3, 4, 5)])[1]` should be \"Sepal.Length\" (is \"Sepal.Width\")" 2/14 alike.R: alike(matrix(integer(), 3, 3), matrix(1:9, nrow = 3)) [1] TRUE 2/14 alike.R: alike(matrix(integer(), 3, 3), matrix(runif(9), nrow = 3)) [1] "`matrix(runif(9), nrow = 3)` should be type \"integer-like\" (is \"double\")" 2/14 alike.R: alike(matrix(integer(), 3), matrix(1:12, nrow = 3)) [1] TRUE 2/14 alike.R: alike(matrix(integer(), 3), matrix(1:12, nrow = 4)) [1] "`matrix(1:12, nrow = 4)` should have 3 rows (has 4)" 2/14 alike.R: alike(matrix(logical()), array(rep(TRUE, 8), rep(2, 3))) [1] "`array(rep(TRUE, 8), rep(2, 3))` should be \"matrix\" (is \"array\")" 2/14 alike.R: obj.tpl <- structure(TRUE, class = letters[1:3]) 2/14 alike.R: obj.cur.1 <- structure(TRUE, class = c("x", letters[1:3])) 2/14 alike.R: obj.cur.2 <- structure(TRUE, class = c(letters[1:3], "x")) 2/14 alike.R: alike(obj.tpl, obj.cur.1) [1] TRUE 2/14 alike.R: alike(obj.tpl, obj.cur.2) [1] "`class(obj.cur.2)[2]` should be \"a\" (is \"b\")" 2/14 alike.R: alike(quote(x + y), quote(a + b)) [1] TRUE 2/14 alike.R: alike(quote(x + y), quote(a - b)) [1] "`quote(a - b)[[1]]` should be a call to `+` (is a call to `-`)" 2/14 alike.R: alike(quote(x + y), quote(a + a)) [1] "`quote(a + a)[[3]]` should not be `a`" 2/14 alike.R: unitizer_sect("Raw", { 2/14 alike.R: alike(as.raw(integer(3)), as.raw(integer(3))) Warning in alike(as.raw(integer(3)), as.raw(integer(3))) : `alike` behavior for objects of type "raw" is not well defined and may change in the future [1] TRUE 2/14 alike.R: unitizer_sect("Errors", { 2/14 alike.R: alike(NULL, NULL, settings = vetr_settings(type.mode = 3)) Error in alike(NULL, NULL, settings = vetr_settings(type.mode = 3)) : Setting `type.mode` must be scalar integer between 0 and 2 (is 3). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> alike 2/14 alike.R: alike(NULL, NULL, settings = vetr_settings(attr.mode = letters)) Error in alike(NULL, NULL, settings = vetr_settings(attr.mode = letters)) : Setting `attr.mode` must be integer-like (is character). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> alike 2/14 alike.R: alike(NULL, NULL, settings = vetr_settings(lang.mode = letters)) Error in alike(NULL, NULL, settings = vetr_settings(lang.mode = letters)) : Setting `lang.mode` must be integer-like (is character). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> alike 2/14 alike.R: alike(NULL, NULL, settings = vetr_settings(fuzzy.int.max.len = NA Error in alike(NULL, NULL, settings = vetr_settings(fuzzy.int.max.len = NA_integer_)) : Setting `fuzzy.int.max.len` may not be NA. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> alike 2/14 alike.R: alike(NULL, NULL, settings = vetr_settings(suppress.warnings = NA Error in alike(NULL, NULL, settings = vetr_settings(suppress.warnings = NA)) : `vet/vetr` usage error: setting `suppress.warnings` must be TRUE or FALSE Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> alike 2/14 alike.R: alike(NULL, NULL, settings = vetr_settings(env = letters)) Error in alike(NULL, NULL, settings = vetr_settings(env = letters)) : `ver/vetr` usage error: setting `env` must be an environment or NULL Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> alike 2/14 alike.R: alike(NULL, NULL, settings = vetr_settings(width = letters)) Error in alike(NULL, NULL, settings = vetr_settings(width = letters)) : Setting `width` must be integer-like (is character). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> alike 2/14 alike.R: alike(NULL, NULL, settings = vetr_settings(env.depth.max = -1L)) [1] TRUE 2/14 alike.R: unitizer_sect("Attributes", { 2/14 alike.R: obj.tpl <- structure(integer(), a = integer()) 2/14 alike.R: obj.obj <- structure(1:10, a = 1:3) 2/14 alike.R: alike(obj.tpl, obj.obj) [1] TRUE 2/14 alike.R: obj.tpl.a <- structure(integer(), class = "foo") 2/14 alike.R: obj.obj.a <- structure(matrix(1:3)) 2/14 alike.R: alike(obj.tpl.a, obj.obj.a) [1] "`obj.obj.a` should be class \"foo\" (is \"integer\")" 2/14 alike.R: obj.tpl.b <- structure(matrix(integer()), class = "foo") 2/14 alike.R: obj.obj.b <- structure(matrix(1:3)) 2/14 alike.R: alike(obj.tpl.b, obj.obj.b) [1] "`obj.obj.b` should be class \"foo\" (is \"integer\")" 2/14 alike.R: obj.tpl.c <- structure(matrix(integer()), class = "foo") 2/14 alike.R: obj.obj.c <- structure(matrix(1:3), class = "foo") 2/14 alike.R: alike(obj.tpl.c, obj.obj.c) [1] TRUE 2/14 alike.R: obj.tpl.d <- structure(integer(), class = "foo") 2/14 alike.R: obj.obj.d <- structure(matrix(1:3), class = "foo") 2/14 alike.R: alike(obj.tpl.d, obj.obj.d) [1] TRUE 2/14 alike.R: obj.tpl.e <- structure(integer()) 2/14 alike.R: obj.obj.e <- structure(matrix(1:3), class = "foo") 2/14 alike.R: alike(obj.tpl.e, obj.obj.e) [1] TRUE 2/14 alike.R: obj.tpl.f <- structure(integer(), a = integer()) 2/14 alike.R: obj.obj.f <- structure(matrix(1:3), z = integer(), class = "foo") 2/14 alike.R: alike(obj.tpl.f, obj.obj.f) [1] "`obj.obj.f` should have attribute \"a\"" 2/14 alike.R: obj.tpl.g <- structure(integer(), a = integer()) 2/14 alike.R: obj.obj.g <- structure(matrix(1:3), z = integer(), class = "foo") 2/14 alike.R: alike(obj.tpl.g, obj.obj.g) [1] "`obj.obj.g` should have attribute \"a\"" 2/14 alike.R: obj.tpl.h <- structure(matrix(integer())) 2/14 alike.R: obj.obj.h <- structure(1:3, a = integer()) 2/14 alike.R: alike(obj.tpl.h, obj.obj.h) [1] "`obj.obj.h` should be \"matrix\" (is \"integer\")" 2/14 alike.R: alike(obj.tpl.h, obj.obj.h, settings = vetr_settings(attr.mode = [1] "`obj.obj.h` should have attribute \"dim\"" 2/14 alike.R: obj.tpl.i <- structure(character(), a = integer(), class = "boo") 2/14 alike.R: obj.obj.i <- structure(matrix(1:3)) 2/14 alike.R: alike(obj.tpl.i, obj.obj.i) [1] "`obj.obj.i` should be class \"boo\" (is \"integer\")" 2/14 alike.R: obj.tpl.k <- integer() 2/14 alike.R: obj.obj.k <- matrix(1:3) 2/14 alike.R: alike(obj.tpl.k, obj.obj.k) [1] TRUE 2/14 alike.R: alike(obj.tpl.k, obj.obj.k, settings = vetr_settings(attr.mode = [1] "`obj.obj.k` should not have attribute \"dim\"" 3/14 all-bw.R: 3/14 all-bw.R: library(vetr) 3/14 all-bw.R: set.seed(42) 3/14 all-bw.R: x <- runif(100) 3/14 all-bw.R: x[1] <- 1 3/14 all-bw.R: x[2] <- 0 3/14 all-bw.R: unitizer_sect("all_bw - real", { 3/14 all-bw.R: all_bw(x, 0, 1) [1] TRUE 3/14 all-bw.R: all_bw(x, 0, 1, bounds = "[)") [1] "`1` at index 1 not in `[0,1)`" 3/14 all-bw.R: all_bw(x, 0, 1, bounds = "(]") [1] "`0` at index 2 not in `(0,1]`" 3/14 all-bw.R: all_bw(x, 0, 1, bounds = "()") [1] "`1` at index 1 not in `(0,1)`" 3/14 all-bw.R: all_bw(x, 0, 1 + 1e-06, bounds = "[)") [1] TRUE 3/14 all-bw.R: all_bw(x, 0 - 1e-06, 1, bounds = "(]") [1] TRUE 3/14 all-bw.R: all_bw(x, 0 - 1e-06, 1 + 1e-06, bounds = "()") [1] TRUE 3/14 all-bw.R: y <- z <- x 3/14 all-bw.R: y[50] <- NA 3/14 all-bw.R: z[50] <- NaN 3/14 all-bw.R: all_bw(y, 0, 1) [1] "`NA` at index 50 not in `[0,1]`" 3/14 all-bw.R: all_bw(y, 0, 1, na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(y, 0.5, 0.75, na.rm = TRUE) [1] "`1` at index 1 not in `[0.500000,0.750000]`" 3/14 all-bw.R: all_bw(y, -1, 2, na.rm = TRUE, bounds = "()") [1] TRUE 3/14 all-bw.R: all_bw(y, 0, 1, na.rm = TRUE, bounds = "()") [1] "`1` at index 1 not in `(0,1)`" 3/14 all-bw.R: all_bw(y, 0 - 1e-06, 1, na.rm = TRUE, bounds = "(]") [1] TRUE 3/14 all-bw.R: all_bw(y, 0, 1, na.rm = TRUE, bounds = "(]") [1] "`0` at index 2 not in `(0,1]`" 3/14 all-bw.R: all_bw(y, 0, 1 + 1e-06, na.rm = TRUE, bounds = "[)") [1] TRUE 3/14 all-bw.R: all_bw(y, 0, 1, na.rm = TRUE, bounds = "[)") [1] "`1` at index 1 not in `[0,1)`" 3/14 all-bw.R: all_bw(z, 0, 1) [1] "`NaN` at index 50 not in `[0,1]`" 3/14 all-bw.R: all_bw(z, 0, 1, na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(z) [1] "`NaN` at index 50 not in `[-Inf,Inf]`" 3/14 all-bw.R: all_bw(z, na.rm = TRUE) [1] TRUE 3/14 all-bw.R: w <- runif(1000, -1000, 1000) 3/14 all-bw.R: all_bw(w, -1000, 1000) [1] TRUE 3/14 all-bw.R: all_bw(w, -1500, 500) [1] "`813.406915` at index 1 not in `[-1500,500]`" 3/14 all-bw.R: all_bw(w, -500, 1500) [1] "`-681.421638` at index 12 not in `[-500,1500]`" 3/14 all-bw.R: unitizer_sect("corner cases - real", { 3/14 all-bw.R: all_bw(x, 0, 0) [1] "`1` at index 1 not in `[0,0]`" 3/14 all-bw.R: all_bw(0, 0, 0) [1] TRUE 3/14 all-bw.R: all_bw(0, 0, 0, bounds = "()") [1] "`0` at index 1 not in `(0,0)`" 3/14 all-bw.R: all_bw(NA_real_) [1] "`NA` at index 1 not in `[-Inf,Inf]`" 3/14 all-bw.R: all_bw(NA_real_, bounds = "()") [1] "`NA` at index 1 not in `(-Inf,Inf)`" 3/14 all-bw.R: all_bw(numeric(), 0, 1) [1] TRUE 3/14 all-bw.R: all_bw(numeric(), 0, 0, bounds = "()") [1] TRUE 3/14 all-bw.R: unitizer_sect("Infinity - real", { 3/14 all-bw.R: n1e100 <- 1e+100 3/14 all-bw.R: n_1e100 <- -1e+100 3/14 all-bw.R: n2e100 <- 2e+100 3/14 all-bw.R: n_2e100 <- -2e+100 3/14 all-bw.R: n11e100 <- 1.1e+100 3/14 all-bw.R: n_11e100 <- -1.1e+100 3/14 all-bw.R: n1e200 <- 1e+200 3/14 all-bw.R: n_1e200 <- -1e+200 3/14 all-bw.R: z <- runif(100, n_1e100, n1e100) 3/14 all-bw.R: z[1] <- n_1e100 3/14 all-bw.R: z[2] <- n1e100 3/14 all-bw.R: r <- w <- v <- u <- x <- z 3/14 all-bw.R: all_bw(z, -Inf, n1e100) [1] TRUE 3/14 all-bw.R: all_bw(z, -Inf, n1e100, bounds = "[)") [1] "`1.000000e+100` at index 2 not in `[-Inf,1.000000e+100)`" 3/14 all-bw.R: all_bw(z, -Inf, n1e100, bounds = "()") [1] "`1.000000e+100` at index 2 not in `(-Inf,1.000000e+100)`" 3/14 all-bw.R: all_bw(z, -Inf, n1e100, bounds = "(]") [1] TRUE 3/14 all-bw.R: all_bw(c(z, n2e100), -Inf, n1e100, bounds = "(]") [1] "`2.000000e+100` at index 101 not in `(-Inf,1.000000e+100]`" 3/14 all-bw.R: all_bw(z, -Inf, n11e100, bounds = "[)") [1] TRUE 3/14 all-bw.R: all_bw(z, -Inf, n11e100, bounds = "()") [1] TRUE 3/14 all-bw.R: all_bw(z, n_1e100, Inf) [1] TRUE 3/14 all-bw.R: all_bw(z, n_1e100, Inf, bounds = "(]") [1] "`-1.000000e+100` at index 1 not in `(-1.000000e+100,Inf]`" 3/14 all-bw.R: all_bw(z, n_1e100, Inf, bounds = "()") [1] "`-1.000000e+100` at index 1 not in `(-1.000000e+100,Inf)`" 3/14 all-bw.R: all_bw(z, n_1e100, Inf, bounds = "[)") [1] TRUE 3/14 all-bw.R: all_bw(c(z, n_2e100), n_1e100, Inf, bounds = "[)") [1] "`-2.000000e+100` at index 101 not in `[-1.000000e+100,Inf)`" 3/14 all-bw.R: all_bw(z, n_11e100, Inf, bounds = "(]") [1] TRUE 3/14 all-bw.R: all_bw(z, n_11e100, Inf, bounds = "()") [1] TRUE 3/14 all-bw.R: r[50] <- NA_real_ 3/14 all-bw.R: all_bw(r, -Inf, n1e100) [1] "`NA` at index 50 not in `[-Inf,1.000000e+100]`" 3/14 all-bw.R: all_bw(r, -Inf, n1e100, bounds = "[)") [1] "`1.000000e+100` at index 2 not in `[-Inf,1.000000e+100)`" 3/14 all-bw.R: all_bw(r, -Inf, n1e100, bounds = "()") [1] "`1.000000e+100` at index 2 not in `(-Inf,1.000000e+100)`" 3/14 all-bw.R: all_bw(r, -Inf, n1e100, bounds = "(]") [1] "`NA` at index 50 not in `(-Inf,1.000000e+100]`" 3/14 all-bw.R: all_bw(r, -Inf, n11e100, bounds = "[)") [1] "`NA` at index 50 not in `[-Inf,1.100000e+100)`" 3/14 all-bw.R: all_bw(r, -Inf, n11e100, bounds = "()") [1] "`NA` at index 50 not in `(-Inf,1.100000e+100)`" 3/14 all-bw.R: all_bw(r, n_1e100, Inf) [1] "`NA` at index 50 not in `[-1.000000e+100,Inf]`" 3/14 all-bw.R: all_bw(r, n_1e100, Inf, bounds = "(]") [1] "`-1.000000e+100` at index 1 not in `(-1.000000e+100,Inf]`" 3/14 all-bw.R: all_bw(r, n_1e100, Inf, bounds = "()") [1] "`-1.000000e+100` at index 1 not in `(-1.000000e+100,Inf)`" 3/14 all-bw.R: all_bw(r, n_1e100, Inf, bounds = "[)") [1] "`NA` at index 50 not in `[-1.000000e+100,Inf)`" 3/14 all-bw.R: all_bw(r, n_11e100, Inf, bounds = "(]") [1] "`NA` at index 50 not in `(-1.100000e+100,Inf]`" 3/14 all-bw.R: all_bw(r, n_11e100, Inf, bounds = "()") [1] "`NA` at index 50 not in `(-1.100000e+100,Inf)`" 3/14 all-bw.R: all_bw(r, -Inf, n1e100, na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(r, -Inf, n1e100, bounds = "[)", na.rm = TRUE) [1] "`1.000000e+100` at index 2 not in `[-Inf,1.000000e+100)`" 3/14 all-bw.R: all_bw(r, -Inf, n1e100, bounds = "()", na.rm = TRUE) [1] "`1.000000e+100` at index 2 not in `(-Inf,1.000000e+100)`" 3/14 all-bw.R: all_bw(r, -Inf, n1e100, bounds = "(]", na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(r, -Inf, n11e100, bounds = "[)", na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(r, -Inf, n11e100, bounds = "()", na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(r, n_1e100, Inf, na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(r, n_1e100, Inf, bounds = "(]", na.rm = TRUE) [1] "`-1.000000e+100` at index 1 not in `(-1.000000e+100,Inf]`" 3/14 all-bw.R: all_bw(r, n_1e100, Inf, bounds = "()", na.rm = TRUE) [1] "`-1.000000e+100` at index 1 not in `(-1.000000e+100,Inf)`" 3/14 all-bw.R: all_bw(r, n_1e100, Inf, bounds = "[)", na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(r, n_11e100, Inf, bounds = "(]", na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(r, n_11e100, Inf, bounds = "()", na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(c(r, n2e100), -Inf, n1e100, na.rm = TRUE) [1] "`2.000000e+100` at index 101 not in `[-Inf,1.000000e+100]`" 3/14 all-bw.R: all_bw(c(r, n_2e100), n_1e100, Inf, na.rm = TRUE) [1] "`-2.000000e+100` at index 101 not in `[-1.000000e+100,Inf]`" 3/14 all-bw.R: all_bw(z, -Inf, Inf) [1] TRUE 3/14 all-bw.R: u[50] <- -Inf 3/14 all-bw.R: all_bw(u, n_1e200, n1e200) [1] "`-Inf` at index 50 not in `[-1.000000e+200,1.000000e+200]`" 3/14 all-bw.R: v[50] <- Inf 3/14 all-bw.R: all_bw(v, n_1e200, n1e200) [1] "`Inf` at index 50 not in `[-1.000000e+200,1.000000e+200]`" 3/14 all-bw.R: w[50] <- -Inf 3/14 all-bw.R: w[51] <- Inf 3/14 all-bw.R: all_bw(w, -Inf, Inf) [1] TRUE 3/14 all-bw.R: all_bw(w, -Inf, Inf, bounds = "[)") [1] "`Inf` at index 51 not in `[-Inf,Inf)`" 3/14 all-bw.R: all_bw(w, -Inf, Inf, bounds = "(]") [1] "`-Inf` at index 50 not in `(-Inf,Inf]`" 3/14 all-bw.R: x.int <- sample(-50:50) 3/14 all-bw.R: unitizer_sect("all_bw - int", { 3/14 all-bw.R: all_bw(x.int, -50, 50) [1] TRUE 3/14 all-bw.R: all_bw(x.int, -50L, 50L) [1] TRUE 3/14 all-bw.R: all_bw(x.int, -50, 50, bounds = "[)") [1] "`50` at index 96 not in `[-50,50)`" 3/14 all-bw.R: all_bw(x.int, -50, 50, bounds = "(]") [1] "`-50` at index 37 not in `(-50,50]`" 3/14 all-bw.R: all_bw(x.int, -50, 50, bounds = "()") [1] "`-50` at index 37 not in `(-50,50)`" 3/14 all-bw.R: all_bw(x.int, -50, 50 + 1e-06, bounds = "[)") [1] TRUE 3/14 all-bw.R: all_bw(x.int, -50 - 1e-06, 50, bounds = "(]") [1] TRUE 3/14 all-bw.R: all_bw(x.int, -50 - 1e-06, 50 + 1e-06, bounds = "()") [1] TRUE 3/14 all-bw.R: y.int <- z.int <- x.int 3/14 all-bw.R: y.int[50] <- NA 3/14 all-bw.R: all_bw(y.int, -50, 50) [1] "`NA` at index 50 not in `[-50,50]`" 3/14 all-bw.R: all_bw(y.int, -50, 50, na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(y.int, -49.5, 49.5, na.rm = TRUE) [1] "`-50` at index 37 not in `[-49.500000,49.500000]`" 3/14 all-bw.R: all_bw(y.int, -51, 51, na.rm = TRUE, bounds = "()") [1] TRUE 3/14 all-bw.R: all_bw(y.int, -50.5, 50.5, na.rm = TRUE, bounds = "()") [1] TRUE 3/14 all-bw.R: all_bw(y.int, -50, 50, na.rm = TRUE, bounds = "()") [1] "`-50` at index 37 not in `(-50,50)`" 3/14 all-bw.R: all_bw(y.int, -50 - 1e-06, 50, na.rm = TRUE, bounds = "(]") [1] TRUE 3/14 all-bw.R: all_bw(y.int, -50, 50, na.rm = TRUE, bounds = "(]") [1] "`-50` at index 37 not in `(-50,50]`" 3/14 all-bw.R: all_bw(y.int, -50, 50 + 1e-06, na.rm = TRUE, bounds = "[)") [1] TRUE 3/14 all-bw.R: all_bw(y.int, -50, 50, na.rm = TRUE, bounds = "[)") [1] "`50` at index 96 not in `[-50,50)`" 3/14 all-bw.R: unitizer_sect("corner cases - int", { 3/14 all-bw.R: all_bw(x.int, 0, 0) [1] "`-12` at index 1 not in `[0,0]`" 3/14 all-bw.R: all_bw(0L, 0, 0) [1] TRUE 3/14 all-bw.R: all_bw(0L, 0, 0, bounds = "()") [1] "`0` at index 1 not in `(0,0)`" 3/14 all-bw.R: all_bw(NA_integer_) [1] "`NA` at index 1 not in `[-Inf,Inf]`" 3/14 all-bw.R: all_bw(NA) [1] "`NA` at index 1 not in `[-Inf,Inf]`" 3/14 all-bw.R: unitizer_sect("Infinity - int", { 3/14 all-bw.R: int.max <- (Reduce(`*`, rep(2L, 30L)) - 1L) * 2L + 1L 3/14 all-bw.R: int.min <- -int.max 3/14 all-bw.R: z.int <- x.int 3/14 all-bw.R: z.int[1] <- int.max 3/14 all-bw.R: z.int[2] <- int.min 3/14 all-bw.R: r.int <- w.int <- v.int <- u.int <- x.int <- z.int 3/14 all-bw.R: all_bw(z.int, -Inf, int.max) [1] TRUE 3/14 all-bw.R: all_bw(z.int, -Inf, int.max, bounds = "[)") [1] "`2147483647` at index 1 not in `[-Inf,2147483647)`" 3/14 all-bw.R: all_bw(z.int, -Inf, int.max, bounds = "()") [1] "`2147483647` at index 1 not in `(-Inf,2147483647)`" 3/14 all-bw.R: all_bw(z.int, -Inf, int.max, bounds = "(]") [1] TRUE 3/14 all-bw.R: all_bw(z.int, -Inf, int.max - 1L, bounds = "(]") [1] "`2147483647` at index 1 not in `(-Inf,2147483646]`" 3/14 all-bw.R: all_bw(z.int, int.min - 1, int.max + 1) [1] TRUE 3/14 all-bw.R: all_bw(z.int, int.min - 1, int.max + 1, bounds = "()") [1] TRUE 3/14 all-bw.R: all_bw(int.max - 1L, -Inf, int.max, bounds = "()") [1] TRUE 3/14 all-bw.R: all_bw(z.int, int.min, Inf) [1] TRUE 3/14 all-bw.R: all_bw(z.int, int.min, Inf, bounds = "(]") [1] "`-2147483647` at index 2 not in `(-2147483647,Inf]`" 3/14 all-bw.R: all_bw(z.int, int.min, Inf, bounds = "()") [1] "`-2147483647` at index 2 not in `(-2147483647,Inf)`" 3/14 all-bw.R: all_bw(z.int, int.min, Inf, bounds = "[)") [1] TRUE 3/14 all-bw.R: all_bw(z.int, int.min + 1L, Inf, bounds = "[)") [1] "`-2147483647` at index 2 not in `[-2147483646,Inf)`" 3/14 all-bw.R: r.int[50] <- NA_integer_ 3/14 all-bw.R: all_bw(r.int, -Inf, int.max) [1] "`NA` at index 50 not in `[-Inf,2147483647]`" 3/14 all-bw.R: all_bw(r.int, -Inf, int.max, bounds = "[)") [1] "`2147483647` at index 1 not in `[-Inf,2147483647)`" 3/14 all-bw.R: all_bw(r.int, -Inf, int.max, bounds = "()") [1] "`2147483647` at index 1 not in `(-Inf,2147483647)`" 3/14 all-bw.R: all_bw(r.int, -Inf, int.max, bounds = "(]") [1] "`NA` at index 50 not in `(-Inf,2147483647]`" 3/14 all-bw.R: all_bw(r.int, -Inf, int.max - 10, bounds = "(]") [1] "`2147483647` at index 1 not in `(-Inf,2147483637]`" 3/14 all-bw.R: all_bw(z.int, -Inf, int.max - 1L, bounds = "(]", na.rm = TRUE) [1] "`2147483647` at index 1 not in `(-Inf,2147483646]`" 3/14 all-bw.R: all_bw(c(int.max - 1L, NA), -Inf, int.max, bounds = "()", na.rm [1] TRUE 3/14 all-bw.R: all_bw(r.int, int.min, Inf) [1] "`NA` at index 50 not in `[-2147483647,Inf]`" 3/14 all-bw.R: all_bw(r.int, int.min, Inf, bounds = "(]") [1] "`-2147483647` at index 2 not in `(-2147483647,Inf]`" 3/14 all-bw.R: all_bw(r.int, int.min, Inf, bounds = "()") [1] "`-2147483647` at index 2 not in `(-2147483647,Inf)`" 3/14 all-bw.R: all_bw(r.int, int.min, Inf, bounds = "[)") [1] "`NA` at index 50 not in `[-2147483647,Inf)`" 3/14 all-bw.R: all_bw(r.int, -Inf, int.max, na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(r.int, -Inf, int.max, bounds = "[)", na.rm = TRUE) [1] "`2147483647` at index 1 not in `[-Inf,2147483647)`" 3/14 all-bw.R: all_bw(r.int, -Inf, int.max, bounds = "()", na.rm = TRUE) [1] "`2147483647` at index 1 not in `(-Inf,2147483647)`" 3/14 all-bw.R: all_bw(r.int, -Inf, int.max, bounds = "(]", na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(r.int, int.min + 10, Inf, bounds = "[)", na.rm = TRUE) [1] "`-2147483647` at index 2 not in `[-2147483637,Inf)`" 3/14 all-bw.R: all_bw(r.int, int.min, Inf, na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(r.int, int.min, Inf, bounds = "(]", na.rm = TRUE) [1] "`-2147483647` at index 2 not in `(-2147483647,Inf]`" 3/14 all-bw.R: all_bw(r.int, int.min, Inf, bounds = "()", na.rm = TRUE) [1] "`-2147483647` at index 2 not in `(-2147483647,Inf)`" 3/14 all-bw.R: all_bw(r.int, int.min, Inf, bounds = "[)", na.rm = TRUE) [1] TRUE 3/14 all-bw.R: unitizer_sect("error", { 3/14 all-bw.R: all_bw(x, 0, -1) Error in all_bw(x, 0, -1) : Argument `hi` (-1) must be greater than or equal to `lo` (0). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, -1, 1, na.rm = 1) Error in all_bw(x, -1, 1, na.rm = 1) : Argument `na_rm` must be logical (is double). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, -1, 1, na.rm = c(TRUE, FALSE)) Error in all_bw(x, -1, 1, na.rm = c(TRUE, FALSE)) : Argument `na_rm` must be length 1 (is 2). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, -1, 1, na.rm = NA) Error in all_bw(x, -1, 1, na.rm = NA) : Argument `na_rm` must be TRUE or FALSE (is NA). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, -1, 1, bounds = TRUE) Error in all_bw(x, -1, 1, bounds = TRUE) : Argument `bounds` must be character (is logical). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, -1, 1, bounds = letters) Error in all_bw(x, -1, 1, bounds = letters) : Argument `bounds` must be length 1 (is 26). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, -1, 1, bounds = "[[") Error in all_bw(x, -1, 1, bounds = "[[") : Argument `bounds` must be character(1L) in "[]", "[)", "(]", "()" Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, -1, 1, bounds = "))") Error in all_bw(x, -1, 1, bounds = "))") : Argument `bounds` must be character(1L) in "[]", "[)", "(]", "()" Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, -1, 1, bounds = "[") Error in all_bw(x, -1, 1, bounds = "[") : Argument `bounds` must be character(1L) in "[]", "[)", "(]", "()" Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, -1, 1, bounds = "[.]") Error in all_bw(x, -1, 1, bounds = "[.]") : Argument `bounds` must be character(1L) in "[]", "[)", "(]", "()" Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, -1, 1, bounds = NA_character_) Error in all_bw(x, -1, 1, bounds = NA_character_) : Argument `bounds` may not be NA. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, 1:3, 4) Error in all_bw(x, 1:3, 4) : Argument `lo` must be length 1 (is 3). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, 1, 4:5) Error in all_bw(x, 1, 4:5) : Argument `hi` must be length 1 (is 2). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(list(), 1, 2) Error in all_bw(list(), 1, 2) : Argument `x` must be numeric-like or character (is list). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, list(), 2) Error in all_bw(x, list(), 2) : Argument `lo` must be length 1 (is 0). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, 1, list()) Error in all_bw(x, 1, list()) : Argument `hi` must be length 1 (is 0). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, list(1), 2) Error in all_bw(x, list(1), 2) : Argument `lo` must be logical, integer, numeric, or character (is list). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, 1, list(1)) Error in all_bw(x, 1, list(1)) : Argument `hi` must be logical, integer, numeric, or character (is list). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, "a", 1) Error in all_bw(x, "a", 1) : Argument `x` is numeric-like, but `lo` is character. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, 1, "a") Error in all_bw(x, 1, "a") : Argument `x` is numeric-like, but `hi` is character. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: unitizer_sect("all_bw - strings", { 3/14 all-bw.R: two.let <- two.let.na <- two.let.inf <- c(letters, do.call(paste 3/14 all-bw.R: all_bw(letters, "a", "z") [1] TRUE 3/14 all-bw.R: all_bw(letters, "z", "a") Error in all_bw(letters, "z", "a") : Argument `hi` (z) must be greater than or equal to `lo` (a). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(letters, "a", "z", bounds = "[)") [1] "`\"z\"` at index 26 not in `[\"a\",\"z\")`" 3/14 all-bw.R: all_bw(letters, "a", "z", bounds = "(]") [1] "`\"a\"` at index 1 not in `(\"a\",\"z\"]`" 3/14 all-bw.R: all_bw(two.let, "aa", "zz") [1] "`\"a\"` at index 1 not in `[\"aa\",\"zz\"]`" 3/14 all-bw.R: all_bw(two.let, "a", "zz") [1] TRUE 3/14 all-bw.R: all_bw(two.let, "a", "zz", bounds = "()") [1] "`\"a\"` at index 1 not in `(\"a\",\"zz\")`" 3/14 all-bw.R: all_bw("A", "a", "z", bounds = "(]") [1] "`\"A\"` at index 1 not in `(\"a\",\"z\"]`" 3/14 all-bw.R: two.let.2 <- tail(head(two.let, -1), -1) 3/14 all-bw.R: all_bw(two.let.2, "a", "zz", bounds = "()") [1] TRUE 3/14 all-bw.R: all_bw(two.let.2, "a", "zz", bounds = "[)") [1] TRUE 3/14 all-bw.R: all_bw(two.let.2, "a", "zz", bounds = "(]") [1] TRUE 3/14 all-bw.R: two.let.2[50] <- NA_character_ 3/14 all-bw.R: all_bw(two.let.2, "a", "zz", bounds = "()", na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(two.let.2, "a", "zz", bounds = "[)", na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(two.let.2, "a", "zz", bounds = "(]", na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(two.let, -Inf, Inf, bounds = "()") [1] TRUE 3/14 all-bw.R: all_bw(two.let, -Inf, Inf, bounds = "[)") [1] TRUE 3/14 all-bw.R: all_bw(two.let, -Inf, Inf, bounds = "(]") [1] TRUE 3/14 all-bw.R: all_bw(two.let, -Inf, Inf, bounds = "[]") [1] TRUE 3/14 all-bw.R: all_bw(two.let, "a", Inf, bounds = "()") [1] "`\"a\"` at index 1 not in `(\"a\",Inf)`" 3/14 all-bw.R: all_bw(two.let, "a", Inf, bounds = "[)") [1] TRUE 3/14 all-bw.R: all_bw(two.let, "a", Inf, bounds = "(]") [1] "`\"a\"` at index 1 not in `(\"a\",Inf]`" 3/14 all-bw.R: all_bw(two.let, "a", Inf, bounds = "[]") [1] TRUE 3/14 all-bw.R: all_bw(two.let, "\t", Inf, bounds = "(]") [1] TRUE 3/14 all-bw.R: all_bw(two.let, -Inf, "zz", bounds = "()") [1] "`\"zz\"` at index 702 not in `(-Inf,\"zz\")`" 3/14 all-bw.R: all_bw(two.let, -Inf, "zz", bounds = "[)") [1] "`\"zz\"` at index 702 not in `[-Inf,\"zz\")`" 3/14 all-bw.R: all_bw(two.let, -Inf, "zz", bounds = "(]") [1] TRUE 3/14 all-bw.R: all_bw(two.let, -Inf, "zz", bounds = "[]") [1] TRUE 3/14 all-bw.R: two.let.inf[1] <- Inf 3/14 all-bw.R: two.let.inf[2] <- -Inf 3/14 all-bw.R: all_bw(two.let.inf, -Inf, Inf, bounds = "()") [1] TRUE 3/14 all-bw.R: all_bw(two.let.inf, -Inf, Inf, bounds = "[)") [1] TRUE 3/14 all-bw.R: all_bw(two.let.inf, -Inf, Inf, bounds = "(]") [1] TRUE 3/14 all-bw.R: all_bw(two.let.inf, -Inf, Inf, bounds = "[]") [1] TRUE 3/14 all-bw.R: two.let.na[50] <- NA_character_ 3/14 all-bw.R: all_bw(two.let.na, "a", "zz", bounds = "()") [1] "`\"a\"` at index 1 not in `(\"a\",\"zz\")`" 3/14 all-bw.R: all_bw(two.let.na, "a", "zz", bounds = "[)") [1] "`\"NA\"` at index 50 not in `[\"a\",\"zz\")`" 3/14 all-bw.R: all_bw(two.let.na, "a", "zz", bounds = "(]") [1] "`\"a\"` at index 1 not in `(\"a\",\"zz\"]`" 3/14 all-bw.R: all_bw(two.let.na, "a", "zz", bounds = "[]") [1] "`\"NA\"` at index 50 not in `[\"a\",\"zz\"]`" 3/14 all-bw.R: all_bw(two.let.na, -Inf, Inf, bounds = "[]") [1] "`\"NA\"` at index 50 not in `[-Inf,Inf]`" 3/14 all-bw.R: all_bw(two.let.na, "a", "zz", bounds = "()", na.rm = TRUE) [1] "`\"a\"` at index 1 not in `(\"a\",\"zz\")`" 3/14 all-bw.R: all_bw(two.let.na, "a", "zz", bounds = "[)", na.rm = TRUE) [1] "`\"zz\"` at index 702 not in `[\"a\",\"zz\")`" 3/14 all-bw.R: all_bw(two.let.na, "a", "zz", bounds = "(]", na.rm = TRUE) [1] "`\"a\"` at index 1 not in `(\"a\",\"zz\"]`" 3/14 all-bw.R: all_bw(two.let.na, "a", "zz", na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(two.let.na, "b", "zy", na.rm = TRUE) [1] "`\"a\"` at index 1 not in `[\"b\",\"zy\"]`" 3/14 all-bw.R: all_bw(two.let.na, -Inf, "zz", na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(two.let.na, -Inf, "zy", na.rm = TRUE) [1] "`\"zz\"` at index 702 not in `[-Inf,\"zy\"]`" 3/14 all-bw.R: all_bw(two.let.na, -Inf, "zy") [1] "`\"NA\"` at index 50 not in `[-Inf,\"zy\"]`" 3/14 all-bw.R: all_bw(two.let.na, -Inf, "zzz", bounds = "[)", na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(two.let.na, -Inf, "zz", bounds = "[)", na.rm = TRUE) [1] "`\"zz\"` at index 702 not in `[-Inf,\"zz\")`" 3/14 all-bw.R: all_bw(two.let.na, -Inf, "zz") [1] "`\"NA\"` at index 50 not in `[-Inf,\"zz\"]`" 3/14 all-bw.R: all_bw(two.let.na, "a", Inf, na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(two.let.na, "a", Inf) [1] "`\"NA\"` at index 50 not in `[\"a\",Inf]`" 3/14 all-bw.R: all_bw(two.let.na, "b", Inf, na.rm = TRUE) [1] "`\"a\"` at index 1 not in `[\"b\",Inf]`" 3/14 all-bw.R: all_bw(two.let.na, "\t", Inf, bounds = "(]", na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(two.let.na, "a", Inf, bounds = "(]", na.rm = TRUE) [1] "`\"a\"` at index 1 not in `(\"a\",Inf]`" 3/14 all-bw.R: all_bw(two.let.na, "a", Inf) [1] "`\"NA\"` at index 50 not in `[\"a\",Inf]`" 3/14 all-bw.R: utf8 <- list(s4 = ("𐀀"), e4 = ("􏿽"), s3 = ("ࠀ"), e3 = ("�"), 3/14 all-bw.R: for (i in seq_along(utf8)) Encoding(utf8[[i]]) <- "UTF-8" 3/14 all-bw.R: all_bw(lorem.ru.phrases, "\t", utf8$e2) [1] TRUE 3/14 all-bw.R: all_bw(lorem.cn.phrases, "\t", utf8$e3) [1] TRUE 4/14 classes.R: 4/14 classes.R: library(vetr) 4/14 classes.R: unitizer_sect("Class Matching", { 4/14 classes.R: obj2 <- structure(numeric()) 4/14 classes.R: obj1 <- structure(numeric(), class = "hello") 4/14 classes.R: alike(obj1, obj2) [1] "`obj2` should be class \"hello\" (is \"numeric\")" 4/14 classes.R: obj2 <- structure(numeric(), class = c(letters[10:12], letters[ 4/14 classes.R: obj1 <- structure(numeric(), class = letters[1:3]) 4/14 classes.R: alike(obj1, obj2) [1] "`class(obj2)[6]` should be \"a\" (is \"c\")" 4/14 classes.R: alike(obj2, obj1) [1] "`class(obj1)[1]` should be \"j\" (is \"a\")" 4/14 classes.R: obj2 <- structure(numeric(), class = c("b", "a", "c")) 4/14 classes.R: alike(obj1, obj2) [1] "`class(obj2)[1]` should be \"a\" (is \"b\")" 4/14 classes.R: obj2 <- structure(numeric(), class = c("a", "b", "x", "c")) 4/14 classes.R: alike(obj1, obj2) [1] "`class(obj2)[2]` should be \"a\" (is \"b\")" 4/14 classes.R: obj2 <- structure(numeric(), class = c("a", "b", "c")) 4/14 classes.R: alike(obj1, obj2) [1] TRUE 4/14 classes.R: obj2 <- structure(numeric(), class = c("x", "a", "b", "c")) 4/14 classes.R: alike(obj1, obj2) [1] TRUE 4/14 classes.R: alike(obj1, obj2, settings = vetr_settings(attr.mode = 1)) [1] "`length(class(obj2))` should be 3 (is 4)" 4/14 classes.R: unitizer_sect("S4", { 4/14 classes.R: x <- new("vetr_foo") 4/14 classes.R: y <- new("vetr_foo") 4/14 classes.R: z <- new("vetr_bar") 4/14 classes.R: v <- new("vetr_baz") 4/14 classes.R: w <- structure(list(a = character(), b = numeric()), class = "v 4/14 classes.R: alike(x, y) [1] TRUE 4/14 classes.R: alike(x, z) [1] "`z` should inherit from S4 class \"vetr_foo\" from pkg:vetr (is \"vetr_bar\" from pkg:vetr)" 4/14 classes.R: alike(x, w) [1] "`w` should be S4" 4/14 classes.R: alike(w, x) [1] "`x` should not be S4" 4/14 classes.R: alike(x, v) [1] TRUE 4/14 classes.R: alike(v, x) [1] "`x` should inherit from S4 class \"vetr_baz\" from pkg:vetr (is \"vetr_foo\" from pkg:vetr)" 4/14 classes.R: lst.2 <- list(list(11, 21), list(31, list(41, list(51, list(61) 4/14 classes.R: lst.5 <- lst.6 <- lst.2 4/14 classes.R: lst.5[[2]][[2]][[1]] <- x 4/14 classes.R: lst.6[[2]][[2]][[1]] <- v 4/14 classes.R: alike(lst.5, lst.6) [1] TRUE 4/14 classes.R: alike(lst.6, lst.5) [1] "`lst.5[[2]][[2]][[1]]` should inherit from S4 class \"vetr_baz\" from pkg:vetr (is \"vetr_foo\" from pkg:vetr)" 4/14 classes.R: v2 <- v 4/14 classes.R: class(v2) <- c("vetr_baz", "vetr_foo") Warning in class(v2) <- c("vetr_baz", "vetr_foo") : Setting class(x) to multiple strings ("vetr_baz", "vetr_foo", ...); result will no longer be an S4 object 4/14 classes.R: alike(x, v2) [1] "`v2` should be S4" 4/14 classes.R: inherits <- function(x, y) stop("pwned!!!") 4/14 classes.R: alike(y, v) [1] TRUE 4/14 classes.R: unitizer_sect("R5", { 4/14 classes.R: Foo.1 <- vetr:::Foo$new() 4/14 classes.R: Foo.2 <- vetr:::Foo$new() 4/14 classes.R: Bar.1 <- vetr:::Bar$new() 4/14 classes.R: alike(Foo.1, Foo.2) [1] TRUE 4/14 classes.R: alike(Foo.1, Bar.1) [1] "`Bar.1` should inherit from S4 class \"Foo\" from pkg:vetr (is \"Bar\" from pkg:vetr)" 4/14 classes.R: unitizer_sect("Non-Standard Class", { 4/14 classes.R: var.1 <- list(1, 2, 3) 4/14 classes.R: var.2 <- list("hello", list(1, 2, 3), 5) 4/14 classes.R: class(var.1) <- "marbles" 4/14 classes.R: class(var.2) <- "marbles" 4/14 classes.R: alike(var.1, var.2) [1] "`var.2[[1]]` should be type \"numeric\" (is \"character\")" 5/14 cstringr.R: 5/14 cstringr.R: library(vetr) 5/14 cstringr.R: unitizer_sect("Basic Tests", { 5/14 cstringr.R: vetr:::len_chr_len(1000L) [1] 4 5/14 cstringr.R: vetr:::len_chr_len(1L) [1] 1 5/14 cstringr.R: vetr:::len_chr_len(1234567890L) [1] 10 5/14 cstringr.R: len0 <- 1.23456789e+24 5/14 cstringr.R: vetr:::len_chr_len(len0) Error in vetr:::len_chr_len(len0) : Argument `maxlen` must be a positive scalar integer Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: vetr:::len_as_chr(1000L) [1] "1000" 5/14 cstringr.R: vetr:::len_as_chr(1L) [1] "1" 5/14 cstringr.R: vetr:::len_as_chr(1234567890L) [1] "1234567890" 5/14 cstringr.R: vetr:::len_as_chr(len0) Error in vetr:::len_as_chr(len0) : Argument `maxlen` must be a positive scalar integer Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: identical(vetr:::strmlen(lorem), nchar(lorem)) [1] TRUE 5/14 cstringr.R: vetr:::strmlen(lorem, 100L) Error in vetr:::strmlen(lorem, 100L) : Internal Error (CSR_strmlen): failed to find string terminator prior to maxlen 100 characters Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: identical(vetr:::strmcpy(lorem), lorem) [1] TRUE 5/14 cstringr.R: vetr:::strmcpy("") [1] "" 5/14 cstringr.R: vetr:::strmcpy(lorem, 20L) Warning in vetr:::strmcpy(lorem, 20L) : CSR_strmcpy: truncated string longer than 20 [1] "Lorem ipsum dolor si" 5/14 cstringr.R: identical(nchar(vetr:::strmcpy(lorem, 20L)), 20L) Warning in vetr:::strmcpy(lorem, 20L) : CSR_strmcpy: truncated string longer than 20 [1] TRUE 5/14 cstringr.R: vetr:::smprintf2("%s %s", lorem, lorem, 10L) Warning in vetr:::smprintf2("%s %s", lorem, lorem, 10L) : CSR_strmcpy: truncated string longer than 10 Warning in vetr:::smprintf2("%s %s", lorem, lorem, 10L) : CSR_strmcpy: truncated string longer than 10 [1] "Lorem ipsu Lorem ipsu" 5/14 cstringr.R: vetr:::smprintf2("%s %s hello world there", lorem, lorem, 10L) Error in vetr:::smprintf2("%s %s hello world there", lorem, lorem, 10L) : Internal Error: formatting string length longer that `nchar.max` contact maintainer., Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: (lorem) [1] "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." 5/14 cstringr.R: vetr:::ucfirst("hello WORLD") [1] "Hello WORLD" 5/14 cstringr.R: vetr:::lcfirst("HELLO world") [1] "hELLO world" 5/14 cstringr.R: vetr:::strbullet(c("hello world\nhow are things today", "once [1] "- hello world\n how are things today" [2] "- once upon a time\n lived a funny duck" 5/14 cstringr.R: vetr:::strbullet("hello\nblah\n", bullet = " - ", ctd = " [1] " - hello\n blah\n" 5/14 cstringr.R: vetr:::strbullet(1:10) Error in vetr:::strbullet(1:10) : First three arguments must be string Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: vetr:::collapse(letters[1:5]) [1] "abcde" 5/14 cstringr.R: vetr:::collapse(letters[1:5], sep = "\n") [1] "a\nb\nc\nd\ne" 5/14 cstringr.R: vetr:::collapse(character()) [1] "" 5/14 cstringr.R: unitizer_sect("numbers as character", { 5/14 cstringr.R: vetr:::num_as_chr(100) [1] "100" 5/14 cstringr.R: vetr:::num_as_chr(100.01) [1] "100.010000" 5/14 cstringr.R: num0 <- 1e+09 + 0.1 5/14 cstringr.R: num1 <- -1e+09 - 0.1 5/14 cstringr.R: sub("e[+-]?\\K0*", "", vetr:::num_as_chr(num0), perl = TRUE) [1] "1.000000e+9" 5/14 cstringr.R: sub("e[+-]?\\K0*", "", vetr:::num_as_chr(num1), perl = TRUE) [1] "-1.000000e+9" 5/14 cstringr.R: vetr:::num_as_chr(num0, as.int = TRUE) [1] "1000000000" 5/14 cstringr.R: vetr:::num_as_chr(num1, as.int = TRUE) [1] "-1000000000" 5/14 cstringr.R: num2 <- 1e+09 - 0.1 5/14 cstringr.R: num3 <- -(1e+09 - 0.1) 5/14 cstringr.R: vetr:::num_as_chr(num2) [1] "999999999.900000" 5/14 cstringr.R: vetr:::num_as_chr(num3) [1] "-999999999.900000" 5/14 cstringr.R: vetr:::num_as_chr(NA) [1] "NA" 5/14 cstringr.R: vetr:::num_as_chr(NaN) [1] "NaN" 5/14 cstringr.R: vetr:::num_as_chr(Inf) [1] "Inf" 5/14 cstringr.R: vetr:::num_as_chr(-Inf) [1] "-Inf" 5/14 cstringr.R: unitizer_sect("smprintf6", { 5/14 cstringr.R: vetr:::smprintf6("%s %s %s %s %s %s", "a", "bb", "ccc", "dddd" [1] "a bb ccc dddd eeeee ffffff" 5/14 cstringr.R: vetr:::smprintf6("%s %s %s %s %s %s", "a", "bb", "ccc", "dddd" Error in vetr:::smprintf6("%s %s %s %s %s %s", "a", "bb", "ccc", "dddd", : Internal Error: formatting string length longer that `nchar.max` contact maintainer., Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: vetr:::smprintf6("%s %s %s %s %s %s", "a", "bb", "ccc", "dddd" [1] "a bb ccc dddd eeeee ffffff" 5/14 cstringr.R: vetr:::smprintf6("%s %s %s %s", "a", "bb", "ccc", "dddd", "eee [1] "a bb ccc dddd" 5/14 cstringr.R: unitizer_sect("Corner Cases", { 5/14 cstringr.R: vetr:::strbullet(c("hello world"), maxlen = 5L) Error in vetr:::strbullet(c("hello world"), maxlen = 5L) : Exceeded `max_len` when trying to bullet `string` Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: vetr:::strbullet(c("hello world"), maxlen = 12L) Error in vetr:::strbullet(c("hello world"), maxlen = 12L) : Exceeded `max_len` when trying to bullet `string` (2) Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: vetr:::strbullet(c("hello world"), maxlen = 14L) [1] "- hello world" 5/14 cstringr.R: (vetr:::test_strmcpy()) Error in vetr:::test_strmcpy() : Argument `maxlen` must be at least one smaller than SIZE_MAX. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: vetr:::test_strappend() Error in vetr:::test_strappend() : Argument `maxlen` must be at least one smaller than max possible size_t value. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: vetr:::test_add_szt() Error in vetr:::test_add_szt() : size_t overflow: you tried to add two size_t numbers that together overflow size_t Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: vetr:::strmlen(list(), 100L) Error in vetr:::strmlen(list(), 100L) : Argument `str` must be a scalar character Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: (vetr:::test_smprintfx()) [1] "a b c d\na b c\na b\na\n" 5/14 cstringr.R: (vetr:::test_strappend2()) Warning in vetr:::test_strappend2() : CSR_strmcopy: truncated string longer than 5 NULL 5/14 cstringr.R: unitizer_sect("substr", { 5/14 cstringr.R: vetr:::strsub(lorem.phrases, 25L, TRUE) [1] "Lorem ipsum dolor sit a.." "consectetur adipiscing .." [3] "sed do eiusmod tempor i.." "Ut enim ad minim veniam," [5] "quis nostrud exercitati.." "Duis aute irure dolor i.." [7] "Excepteur sint occaecat.." "sunt in culpa qui offic.." 5/14 cstringr.R: vetr:::strsub(lorem.phrases, 25L, FALSE) [1] "Lorem ipsum dolor sit ame" "consectetur adipiscing el" [3] "sed do eiusmod tempor inc" "Ut enim ad minim veniam," [5] "quis nostrud exercitation" "Duis aute irure dolor in " [7] "Excepteur sint occaecat c" "sunt in culpa qui officia" 5/14 cstringr.R: vetr:::strsub(lorem.tr.phrases, 25L, TRUE) [1] "Bu tartışmalı tarihsel .." "Stalin'e düşman veya St.." [3] "Stalin karşıtlarının te.." "Hitlerle aralarındaki a.." [5] "Estonya," "Letonya," [7] "Litvanya," "Romanya ve Polonya'nin .." [9] "Stalin'in doğru yaptığı.." "1937'deki Münih görüşme.." [11] "İngiliz ve Fransız empe.." "Nazileri kışkırtıyorlar.." [13] "Bu amaçla Avusturya'nın.." "özellikle Çekoslovakya'.." [15] "Böylece Sovyetler Birli.." "kendi sınırlarını güven.." [17] "Stalin'in amaçlarına gö.." "Polonya ve Baltık ülkel.." [19] "Nazilerin Sovyetler Bir.." "Böylece 1939 yılında Na.." [21] "Litvanya ve Letonya'yı .." "Finlandiya'ya saldırdı .." [23] "1941'de Hitler'in Sovye.." "II." [25] "Dünya Savaşı'nın en ağı.." 5/14 cstringr.R: vetr:::strsub(lorem.tr.phrases, 25L, FALSE) [1] "Bu tartışmalı tarihsel dö" "Stalin'e düşman veya Stal" [3] "Stalin karşıtlarının tezl" "Hitlerle aralarındaki açı" [5] "Estonya," "Letonya," [7] "Litvanya," "Romanya ve Polonya'nin Na" [9] "Stalin'in doğru yaptığını" "1937'deki Münih görüşmele" [11] "İngiliz ve Fransız empery" "Nazileri kışkırtıyorlardı" [13] "Bu amaçla Avusturya'nın A" "özellikle Çekoslovakya'nı" [15] "Böylece Sovyetler Birliği" "kendi sınırlarını güvence" [17] "Stalin'in amaçlarına göre" "Polonya ve Baltık ülkeler" [19] "Nazilerin Sovyetler Birli" "Böylece 1939 yılında Nazi" [21] "Litvanya ve Letonya'yı sı" "Finlandiya'ya saldırdı ve" [23] "1941'de Hitler'in Sovyetl" "II." [25] "Dünya Savaşı'nın en ağır " 5/14 cstringr.R: vetr:::strsub(lorem.ru.phrases, 25L, TRUE) [1] "Родился 6 (18) декабря .." "Позже она подтверждалас.." [3] "хотя начиная с 1929 год.." "Был третьим сыном в сем.." [5] "первые двое умерли в мл.." "Его родным языком был г.." [7] "русский язык Сталин выу.." "но всегда говорил с зам.." [9] "Согласно утверждениям д.." "Сталин," [11] "однако," "пел по-русски практичес.." 5/14 cstringr.R: vetr:::strsub(lorem.ru.phrases, 25L, FALSE) [1] "Родился 6 (18) декабря 18" "Позже она подтверждалась " [3] "хотя начиная с 1929 года[" "Был третьим сыном в семье" [5] "первые двое умерли в млад" "Его родным языком был гру" [7] "русский язык Сталин выучи" "но всегда говорил с замет" [9] "Согласно утверждениям доч" "Сталин," [11] "однако," "пел по-русски практически" 5/14 cstringr.R: vetr:::strsub(lorem.cn.phrases, 25L, TRUE) [1] "中華人民共和國是單一制的多民族國家。" [2] "全國劃分為23個省(其中台灣省并沒有實際管辖)、" [3] "5個自治區、" [4] "4個直轄市和2個根據一國兩制設立的特別行政區,.." [5] "中华人民共和国跨越五个地理时区,但全国均使用北.." [6] "中華人民共和國官方認定的民族現有56個,其中最.." [7] "维吾尔族、" [8] "滿族、" [9] "蒙古族、" [10] "藏族、" [11] "朝鲜族等也多使用自己的語言與文字。" [12] "主要宗教有佛教、" [13] "道教、" [14] "基督教(多指新教)、" [15] "天主教和伊斯兰教等,但過半人口無特定宗教信仰。" [16] "中华人民共和国的通用语言是汉语普通話,當中在中.." 5/14 cstringr.R: vetr:::strsub(lorem.cn.phrases, 25L, FALSE) [1] "中華人民共和國是單一制的多民族國家。" [2] "全國劃分為23個省(其中台灣省并沒有實際管辖)、" [3] "5個自治區、" [4] "4個直轄市和2個根據一國兩制設立的特別行政區,均直" [5] "中华人民共和国跨越五个地理时区,但全国均使用北京时" [6] "中華人民共和國官方認定的民族現有56個,其中最大民" [7] "维吾尔族、" [8] "滿族、" [9] "蒙古族、" [10] "藏族、" [11] "朝鲜族等也多使用自己的語言與文字。" [12] "主要宗教有佛教、" [13] "道教、" [14] "基督教(多指新教)、" [15] "天主教和伊斯兰教等,但過半人口無特定宗教信仰。" [16] "中华人民共和国的通用语言是汉语普通話,當中在中國大" 5/14 cstringr.R: vetr:::strsub(lorem.phrases, 1:2, TRUE) Error in vetr:::strsub(lorem.phrases, 1:2, TRUE) : Argument `chars` must be scalar integer, strictly positive, and not NA. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: vetr:::strsub(lorem.phrases, 25L, 1:2) Error in vetr:::strsub(lorem.phrases, 25L, 1:2) : Argument `mark_trunc` must be a TRUE or FALSE. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: vetr:::strsub(1:2, 25L, TRUE) Error in vetr:::strsub(1:2, 25L, TRUE) : Argument `string` must be a string. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: vetr:::strsub(lorem.phrases, 2L, TRUE) Error in vetr:::strsub(lorem.phrases, 2L, TRUE) : Argument `chars` must be greater than 2 when `mark_trunc` is TRUE. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: vetr:::strsub(lorem.phrases, 3L, TRUE) [1] "L.." "c.." "s.." "U.." "q.." "D.." "E.." "s.." 5/14 cstringr.R: unitizer_sect("nchar_u", { 5/14 cstringr.R: vetr:::nchar_u(1:10) Error in vetr:::nchar_u(1:10) : Argument `string` must be a character vector. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: vetr:::nchar_u(c("a", "ab", "abc")) [1] 1 2 3 5/14 cstringr.R: unitizer_sect("char_offsets", { 5/14 cstringr.R: vetr:::char_offsets(1:10) Error in vetr:::char_offsets(1:10) : Argument `string` must be a character vector. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: vetr:::char_offsets(c("a", "ab", "abc")) Error in vetr:::char_offsets(c("a", "ab", "abc")) : Argument `string` must be scalar. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: unitizer_sect("UTF8 corner cases, in UTF-8", { 5/14 cstringr.R: utf8.kuhn <- readLines("unitizer/helper/UTF-8-test.txt", encod Warning in readLines("unitizer/helper/UTF-8-test.txt", encoding = "UTF-8") : line 91 appears to contain an embedded nul 5/14 cstringr.R: test.start <- grep("^Here come the tests:", utf8.kuhn, useByte 5/14 cstringr.R: test.start [1] 81 5/14 cstringr.R: utf8.test <- tail(utf8.kuhn, -test.start) 5/14 cstringr.R: nchar.base <- nchar(utf8.test, allowNA = TRUE) 5/14 cstringr.R: untranslatable <- is.na(nchar.base) 5/14 cstringr.R: nchar.vetr <- vetr:::nchar_u(utf8.test) 5/14 cstringr.R: base.vetr.diff <- !is.na(nchar.base) & nchar.vetr != nchar.bas 5/14 cstringr.R: source("unitizer/helper/UTF-8-unicode-10-ex.R", local = TRUE) 5/14 cstringr.R: vetr:::nchar_u(unicode.10[1]) [1] 3 5/14 cstringr.R: vetr:::nchar_u(unicode.10[2]) [1] 2 5/14 cstringr.R: vetr:::nchar_u(unicode.10[3]) [1] 3 5/14 cstringr.R: vetr:::nchar_u(unicode.10[4]) [1] 10 5/14 cstringr.R: vetr:::char_offsets(unicode.10[4]) [1] 1 -3 -2 -1 1 -1 1 -1 -1 1 5/14 cstringr.R: source("unitizer/helper/UTF-8-critical.R", local = TRUE) 5/14 cstringr.R: Map(vetr:::char_offsets, crit.1) $n.0 [1] 1 $y.1 [1] -1 5/14 cstringr.R: Map(vetr:::char_offsets, crit.2) $n.0 [1] -1 -1 $n.1 [1] -1 1 $y.2 [1] 2 $y.3 [1] 2 $n.4 [1] -1 -1 5/14 cstringr.R: Map(vetr:::char_offsets, crit.3) $n.00 [1] -1 -1 -1 $n.01 [1] -2 1 $y.02 [1] 3 $y.03 [1] 3 $n.04 [1] -2 -1 $n.05 [1] -1 1 -1 $y.06 [1] 3 $y.07 [1] 3 $n.08 [1] -2 -1 $n.10 [1] -1 -1 -1 $n.11 [1] -1 1 -1 $n.12 [1] -2 1 $y.13 [1] 3 $y.14 [1] 3 $n.16 [1] -2 -1 $n.17 [1] -1 -1 -1 $n.18 [1] -2 1 $n.19 [1] -1 1 -1 $y.20 [1] 3 $y.21 [1] 3 $n.22 [1] -2 -1 $n.23 [1] -1 -1 -1 5/14 cstringr.R: Map(vetr:::char_offsets, crit.4) $n.00 [1] -1 -1 -1 -1 $n.01 [1] -2 1 -1 $n.02 [1] -3 1 $y.03 [1] 4 $y.04 [1] 4 $n.06 [1] -3 -1 $n.07 [1] -2 -1 -1 $n.08 [1] -1 -1 -1 -1 $n.09 [1] -3 1 $n.10 [1] -2 1 -1 $n.11 [1] -1 1 -1 -1 $y.12 [1] 4 $y.13 [1] 4 $n.14 [1] -3 -1 $n.15 [1] -2 -1 -1 $n.16 [1] -1 -1 -1 -1 $n.17 [1] -3 1 $n.18 [1] -2 1 -1 $n.19 [1] -1 1 -1 -1 $y.20 [1] 4 $y.21 [1] 4 $n.22 [1] -3 -1 $n.23 [1] -2 -1 -1 $n.24 [1] -1 -1 1 1 $n.25 [1] -1 -1 -1 -1 5/14 cstringr.R: unitizer_sect("UTF-8 corner cases - other encodings", { 5/14 cstringr.R: source("unitizer/helper/latin-1.R", local = TRUE) 5/14 cstringr.R: lapply(lat.1.1, vetr:::char_offsets) [[1]] [1] 1 1 2 1 [[2]] [1] 1 1 1 1 1 [[3]] [1] 2 1 2 1 2 1 2 1 2 5/14 cstringr.R: lapply(lat.1.2, vetr:::char_offsets) [[1]] [1] 1 1 1 1 [[2]] [1] 1 1 1 1 1 [[3]] [1] 1 1 1 1 1 1 1 1 1 5/14 cstringr.R: vetr:::strsub(lat.1.1, 3L, mark = FALSE) [1] "niñ" "hel" "µ ¶" 5/14 cstringr.R: vetr:::strsub(lat.1.2, 3L, mark = FALSE) [1] "ni\\xf1" "hel" "\\xb5 \\xb6" 6/14 eval.R: 6/14 eval.R: library(vetr) 6/14 eval.R: unitizer_sect("evaluate", { 6/14 eval.R: vetr:::eval_check(quote(logical(2L)), quote(xyz), 1:2) [[1]] [1] "`xyz`" "be" "type \"logical\"" "is" [5] "\"integer\"" 6/14 eval.R: vetr:::eval_check(quote(logical(2L)), quote(xyz), c(TRUE, FALSE)) list() 6/14 eval.R: vetr:::eval_check(quote(logical(2L)), quote(xyz), c(TRUE, FALSE, [[1]] [1] "`length(xyz)`" "be" "2" "is" [5] "3" 6/14 eval.R: vetr:::eval_check(quote(logical(2L) || NULL), quote(xyz), 1:2) [[1]] [1] "`xyz`" "be" "type \"logical\"" "is" [5] "\"integer\"" [[2]] [1] "`xyz`" "be" "`NULL`" "is" "\"integer\"" 6/14 eval.R: vetr:::eval_check(quote(logical(2L) || NULL), quote(xyz), NULL) list() 6/14 eval.R: vetr:::eval_check(quote(logical(2L) || NULL), quote(xyz), c(TRUE, list() 6/14 eval.R: vetr:::eval_check(quote(matrix(integer(), nrow = 3) || NULL), list() 6/14 eval.R: vetr:::eval_check(quote(matrix(integer(), nrow = 3) || NULL), [[1]] [1] "`xyz`" "be" "\"matrix\"" "is" "\"integer\"" [[2]] [1] "`xyz`" "be" "`NULL`" "is" "\"integer\"" 6/14 eval.R: vetr:::eval_check(quote(matrix(integer(), nrow = 3) || vector("lis [[1]] [1] "`xyz`" "be" "\"matrix\"" "is" "\"list\"" [[2]] [1] "`length(xyz)`" "be" "2" "is" [5] "1" 6/14 eval.R: vetr:::eval_check(quote(matrix(integer(), nrow = 3) || vector("lis list() 6/14 eval.R: vetr:::eval_check(quote(matrix(integer(), nrow = 3) || list(charac [[1]] [1] "`xyz`" "be" "\"matrix\"" "is" "\"list\"" [[2]] [1] "`xyz[[2]]`" "be" "type \"integer-like\"" [4] "is" "\"character\"" 6/14 eval.R: unitizer_sect("evaluate with sub", { 6/14 eval.R: xyz <- c(TRUE, TRUE) 6/14 eval.R: vetr:::eval_check(quote(logical(2L) && .(all(xyz))), quote(xyz), Error in vetr:::eval_check(quote(logical(2L) && .(all(xyz))), quote(xyz), : vet/vetr usage error: found symbol `xyz` in vetting token for object with the same symbol. Please use `.` to reference the object being checked by the vetting token (e.g. use `vet(. > 0, x)` instead of `vet(x > 0, x)`) Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 6/14 eval.R: vetr:::eval_check(quote(logical(2L) && .(all(.))), quote(xyz), list() 6/14 eval.R: vetr:::eval_check(quote(logical(2L) && .(!any(is.na(.)))), quote(x list() 6/14 eval.R: xyz <- c(TRUE, NA) 6/14 eval.R: vetr:::eval_check(quote(logical(2L) && .(!any(is.na(.)))), quote(x [[1]] [1] "`!any(is.na(xyz))` is not TRUE (FALSE)" 6/14 eval.R: xyz <- c(TRUE, FALSE, TRUE) 6/14 eval.R: vetr:::eval_check(quote(logical(2L) && .(!any(is.na(.)))), quote(x [[1]] [1] "`length(xyz)`" "be" "2" "is" [5] "3" 6/14 eval.R: abc1 <- letters[1:5] 6/14 eval.R: vetr:::eval_check(quote(character(5L) && .(all(. %in% letters[1:3] [[1]] [1] "`all(abc1 %in% letters[1:3])` is not TRUE (FALSE)" 6/14 eval.R: abc2 <- rep("a", 5) 6/14 eval.R: vetr:::eval_check(quote(character(5L) && .(all(. %in% letters[1:3] list() 6/14 eval.R: mat1 <- matrix(1:30, ncol = 3) 6/14 eval.R: vetr:::eval_check(quote((matrix(numeric(), ncol = 3) || matrix(int list() 6/14 eval.R: mat2 <- matrix(1:120, ncol = 3) 6/14 eval.R: vetr:::eval_check(quote((matrix(numeric(), ncol = 3) || matrix(int [[1]] [1] "`length(mat2) < 100` is not TRUE (FALSE)" 6/14 eval.R: mat3 <- LETTERS[1:9] 6/14 eval.R: vetr:::eval_check(quote((matrix(numeric(), ncol = 3) || matrix(int [[1]] [1] "`mat3`" "be" "\"matrix\"" "is" [5] "\"character\"" [[2]] [1] "`mat3`" "be" "\"matrix\"" "is" [5] "\"character\"" [[3]] [1] "`length(mat3)`" "be" "10" "is" [5] "9" 6/14 eval.R: vetr:::eval_check(quote(matrix(numeric(), ncol = 3) || matrix(inte [[1]] [1] "`mat3`" "be" "\"matrix\"" "is" [5] "\"character\"" [[2]] [1] "`mat3`" "be" "\"matrix\"" "is" [5] "\"character\"" [[3]] [1] "`length(mat3)`" "be" "10" "is" [5] "9" [[4]] [1] "`length(mat3) > 20` is not TRUE (FALSE)" 6/14 eval.R: unitizer_sect("custom expressions", { 6/14 eval.R: x <- -1:1 6/14 eval.R: y <- 1 6/14 eval.R: z <- -1 6/14 eval.R: w <- NA_integer_ 6/14 eval.R: u <- integer() 6/14 eval.R: t <- 1:3 6/14 eval.R: vetr:::eval_check(quote(. > 0), quote(x), x) [[1]] [1] "`x > 0` is not all TRUE (contains non-TRUE values)" 6/14 eval.R: vetr:::eval_check(quote(. > 0), quote(y), y) list() 6/14 eval.R: vetr:::eval_check(quote(. > 0), quote(z), z) [[1]] [1] "`z > 0` is not TRUE (FALSE)" 6/14 eval.R: vetr:::eval_check(quote(. > 0), quote(t), t) list() 6/14 eval.R: vetr:::eval_check(quote(. > 0), quote(w), w) [[1]] [1] "`w > 0` is not TRUE (NA)" 6/14 eval.R: vetr:::eval_check(quote(. > 0), quote(u), u) list() 6/14 eval.R: unitizer_sect("Errors", { 6/14 eval.R: vetr:::eval_check(1:3, 1:3, TRUE, env = list(1:3)) Error in vetr:::eval_check(1:3, 1:3, TRUE, env = list(1:3)) : `vet/vetr` usage error: argument `env` must be an environment. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 6/14 eval.R: vetr:::eval_check(quote(y), quote(x), TRUE, env = list(1:3)) Error in vetr:::eval_check(quote(y), quote(x), TRUE, env = list(1:3)) : `vet/vetr` usage error: argument `env` must be an environment. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 7/14 internal.R: 7/14 internal.R: library(vetr) 7/14 internal.R: unitizer_sect("Name like attributes", { 7/14 internal.R: vetr:::name_compare(c("", "hello"), c("abc", "hello")) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::name_compare(c("ab", "hello"), c("abc", "hello")) $success [1] 0 $message $message$message [1] "be" "\"ab\"" "is" "\"abc\"" $message$wrap $message$wrap[[1]] NULL[1] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $message$wrap[[2]][[2]] [1] 1 $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::name_compare(c(NA_character_, "hello"), c("abc", "hello $success [1] 0 $message $message$message [1] "be" "\"NA\"" "is" "\"abc\"" $message$wrap $message$wrap[[1]] NULL[1] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $message$wrap[[2]][[2]] [1] 1 $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::name_compare(c("ab", "hello"), c(NA_character_, "hello" $success [1] 0 $message $message$message [1] "be" "\"ab\"" "is" "\"NA\"" $message$wrap $message$wrap[[1]] NULL[1] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $message$wrap[[2]][[2]] [1] 1 $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::name_compare(c(NA_character_, "hello"), c(NA_character_ $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::name_compare(1:3, 3:1) $success [1] 0 $message $message$message [1] "be" "identical to target" "" [4] "" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: unitizer_sect("S3 Classes", { 7/14 internal.R: class1 <- letters[1:5] 7/14 internal.R: class2 <- letters[3:5] 7/14 internal.R: class3 <- letters[c(4, 3, 5)] 7/14 internal.R: class4 <- character() 7/14 internal.R: class5 <- NULL 7/14 internal.R: class6 <- list("a", "b", "c") 7/14 internal.R: vetr:::class_compare(class2, class1, 0) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::class_compare(class1, class2, 0) $success [1] 0 $message $message$message [1] "be" "\"a\"" "is" "\"c\"" $message$wrap $message$wrap[[1]] class(NULL)[1] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::class_compare(class1, class1[1:3], 0) $success [1] 0 $message $message$message [1] "inherit" "from class \"d\"" "" "" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::class_compare(class3, class2, 0) $success [1] 0 $message $message$message [1] "be" "\"d\"" "is" "\"c\"" $message$wrap $message$wrap[[1]] class(NULL)[1] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::class_compare(class3, class1, 0) $success [1] 0 $message $message$message [1] "be" "\"d\"" "is" "\"c\"" $message$wrap $message$wrap[[1]] class(NULL)[3] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::class_compare(class5, class2, 0) $success [1] 0 $message $message$message [1] "be" [2] "`alike` the corresponding element in target" [3] "" [4] "" $message$wrap $message$wrap[[1]] class(NULL) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::class_compare(class2, class5, 0) $success [1] 0 $message $message$message [1] "be" [2] "`alike` the corresponding element in target" [3] "" [4] "" $message$wrap $message$wrap[[1]] class(NULL) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::class_compare(class5, class5, 0) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::class_compare(class6, class2, 0) $success [1] 0 $message $message$message [1] "be" [2] "`alike` the corresponding element in target" [3] "" [4] "" $message$wrap $message$wrap[[1]] class(NULL) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::class_compare(class2, class6, 0) $success [1] 0 $message $message$message [1] "be" [2] "`alike` the corresponding element in target" [3] "" [4] "" $message$wrap $message$wrap[[1]] class(NULL) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: class7 <- c("a", "data.frame") 7/14 internal.R: vetr:::class_compare(class7, class1, 0) $success [1] 0 $message $message$message [1] "be" "\"a\"" "is" "\"d\"" $message$wrap $message$wrap[[1]] class(NULL)[4] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 1 $lvl [1] 0 7/14 internal.R: vetr:::class_compare(class1, class7, 0) $success [1] 0 $message $message$message [1] "be" "\"b\"" "is" "\"data.frame\"" $message$wrap $message$wrap[[1]] class(NULL)[2] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: unitizer_sect("Dimnames", { 7/14 internal.R: dimn1 <- list(NULL, NULL, NULL) 7/14 internal.R: dimn2 <- list(a = letters[1:3], b = letters[4:6], c = letters[ 7/14 internal.R: dimn3 <- list(letters[1:3], b = letters[4:6], c = letters[7:9] 7/14 internal.R: dimn4 <- list(letters[1:3], B = letters[4:6], C = letters[7:9] 7/14 internal.R: dimn5 <- list(a = LETTERS[1:3], b = letters[4:6], c = letters[ 7/14 internal.R: dimn6 <- list(a = "", b = letters[4:6], c = letters[7:9]) 7/14 internal.R: dimn7 <- list() 7/14 internal.R: dimn8 <- list(a = LETTERS[1:3], b = letters[4:6], c = letters[ 7/14 internal.R: dimn9 <- list(a = 1:3, b = letters[4:6], c = letters[7:9]) 7/14 internal.R: dimn10 <- list(a = list("a", "b", "c"), b = letters[4:6], c = 7/14 internal.R: dimn11 <- NULL 7/14 internal.R: dimn12 <- matrix(letters[1:9], nrow = 3) 7/14 internal.R: dimn13 <- `attr<-`(dimn2, "bar", "yowza") 7/14 internal.R: dimn14 <- `attr<-`(dimn2, "bar", "yowz") 7/14 internal.R: dimn15 <- list(a = letters[1:3], b = letters[1:3]) 7/14 internal.R: dimn16 <- list(a = letters[1:3], b = letters[1:3]) 7/14 internal.R: attr(dimn15, "a") <- 1:2 7/14 internal.R: attr(dimn16, "a") <- 1:3 7/14 internal.R: dimn17 <- list(a = letters[1:3]) 7/14 internal.R: dimn18 <- list(a = letters[1:2], b = letters[1:3]) 7/14 internal.R: vetr:::dimname_compare(dimn3, dimn2) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn2, dimn3) $success [1] 0 $message $message$message [1] "be" "\"a\"" "is" "\"\"" $message$wrap $message$wrap[[1]] names(dimnames(NULL))[1] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn3, dimn4) $success [1] 0 $message $message$message [1] "be" "\"b\"" "is" "\"B\"" $message$wrap $message$wrap[[1]] names(dimnames(NULL))[2] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn2, dimn5) $success [1] 0 $message $message$message [1] "be" "\"a\"" "is" "\"A\"" $message$wrap $message$wrap[[1]] dimnames(NULL)[[1]][1] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn6, dimn5) $success [1] 0 $message $message$message [1] "be" "1" "is" "3" $message$wrap $message$wrap[[1]] length(dimnames(NULL)[[1]]) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn5, dimn6) $success [1] 0 $message $message$message [1] "be" "3" "is" "1" $message$wrap $message$wrap[[1]] length(dimnames(NULL)[[1]]) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn2, dimn1) $success [1] 0 $message $message$message [1] "have" "attribute \"names\"" "" [4] "" $message$wrap $message$wrap[[1]] dimnames(NULL) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn1, dimn2) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn11, dimn2) $success [1] 0 $message $message$message [1] "be" "`NULL`" "is" "\"list\"" $message$wrap $message$wrap[[1]] dimnames(NULL) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn11, dimn11) $success [1] 0 $message $message$message [1] "have" "a \"dimnames\" attribute" [3] "" "" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn7, dimn2) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn2, dimn7) $success [1] 0 $message $message$message [1] "be" "3" "is" "0" $message$wrap $message$wrap[[1]] length(dimnames(NULL)) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn7, dimn7) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn5, dimn8) $success [1] 0 $message $message$message [1] "be" "3" "is" "4" $message$wrap $message$wrap[[1]] length(dimnames(NULL)) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn8, dimn5) $success [1] 0 $message $message$message [1] "be" "4" "is" "3" $message$wrap $message$wrap[[1]] length(dimnames(NULL)) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn9, dimn2) $success [1] 0 $message $message$message [1] "be" "type \"integer-like\"" "is" [4] "\"character\"" $message$wrap $message$wrap[[1]] dimnames(NULL)[[1]] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn2, dimn9) $success [1] 0 $message $message$message [1] "be" "type \"character\"" "is" [4] "\"integer\"" $message$wrap $message$wrap[[1]] dimnames(NULL)[[1]] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn2, dimn12) $success [1] 0 $message $message$message [1] "be" "type \"list\"" "is" "\"character\"" $message$wrap $message$wrap[[1]] dimnames(NULL) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn12, dimn12) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn2, dimn13) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn13, dimn2) $success [1] 0 $message $message$message [1] "not be" "missing" "" "" $message$wrap $message$wrap[[1]] attr(dimnames(NULL), "bar") $message$wrap[[2]] $message$wrap[[2]][[1]] [1] "bar" $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn13, dimn14) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn14, dimn13) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn15, dimn16) $success [1] 0 $message $message$message [1] "be" "2" "is" "3" $message$wrap $message$wrap[[1]] length(attr(dimnames(NULL), "a")) $message$wrap[[2]] $message$wrap[[2]][[1]] [1] "a" $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn17, dimn18) $success [1] 0 $message $message$message [1] "be" "1" "is" "2" $message$wrap $message$wrap[[1]] length(dimnames(NULL)) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: unitizer_sect("Dims", { 7/14 internal.R: dim1 <- rep(2L, 2) 7/14 internal.R: dim2 <- rep(2L, 3) 7/14 internal.R: dim3 <- rep(2L, 4) 7/14 internal.R: dim4 <- c(1L, 1L) 7/14 internal.R: dim5 <- 2L 7/14 internal.R: dim6 <- c(1L, 2L, 3L) 7/14 internal.R: dim7 <- rep(0L, 2) 7/14 internal.R: dim8 <- c(0L, 0L, 2L) 7/14 internal.R: dim9 <- NULL 7/14 internal.R: dim10 <- letters[1:2] 7/14 internal.R: dim11 <- list(2L, 2L) 7/14 internal.R: vetr:::dim_compare(dim1, dim2) $success [1] 0 $message $message$message [1] "be" "\"matrix\"" "is" "\"array\"" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 1 7/14 internal.R: vetr:::dim_compare(dim2, dim3) $success [1] 0 $message $message$message [1] "have" "3 dimensions" "has" "4" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dim_compare(dim1, dim4) $success [1] 0 $message $message$message [1] "have" "2 rows" "has" "1" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dim_compare(dim2, dim6) $success [1] 0 $message $message$message [1] "have" "size 2 at dimension 1" "has" [4] "1" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dim_compare(dim7, dim1) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dim_compare(dim7, dim4) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dim_compare(dim1, dim7) $success [1] 0 $message $message$message [1] "have" "2 rows" "has" "0" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dim_compare(dim7, dim2) $success [1] 0 $message $message$message [1] "be" "\"matrix\"" "is" "\"array\"" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 1 7/14 internal.R: vetr:::dim_compare(dim8, dim2) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dim_compare(dim8, dim6) $success [1] 0 $message $message$message [1] "have" "size 2 at dimension 3" "has" [4] "3" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dim_compare(dim6, dim9) $success [1] 0 $message $message$message [1] "be" "\"array\"" "is" "\"integer\"" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 1 7/14 internal.R: vetr:::dim_compare(9L, NULL) $success [1] 0 $message $message$message [1] "have" "a \"dim\" attribute" "" [4] "" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dim_compare(dim1, dim2, list()) $success [1] 0 $message $message$message [1] "be" "\"list\"" "is" "\"integer\"" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 1 7/14 internal.R: vetr:::dim_compare(dim1, dim2, cur_obj = list()) $success [1] 0 $message $message$message [1] "be" "\"integer\"" "is" "\"list\"" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 1 7/14 internal.R: vetr:::dim_compare(dim1, dim2, list(), list()) $success [1] 0 $message $message$message [1] "have" "2 dimensions" "has" "3" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dim_compare(dim1, dim2, integer(), list()) $success [1] 0 $message $message$message [1] "be" "\"integer\"" "is" "\"list\"" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 1 7/14 internal.R: vetr:::dim_compare(dim9, dim6) $success [1] 0 $message $message$message [1] "be" "\"integer\"" "is" "\"array\"" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 1 7/14 internal.R: vetr:::dim_compare(dim10, dim1) $success [1] 0 $message $message$message [1] "be" [2] "`alike` the corresponding element in target" [3] "" [4] "" $message$wrap $message$wrap[[1]] dim(NULL) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: unitizer_sect("Time Series", { 7/14 internal.R: ts.1 <- attr(ts(runif(24), 1970, frequency = 12), "tsp") 7/14 internal.R: ts.2 <- attr(ts(runif(24), 1970, frequency = 4), "tsp") 7/14 internal.R: ts.3 <- ts.4 <- ts.1 7/14 internal.R: ts.3[[2L]] <- 0 7/14 internal.R: ts.4[[3L]] <- 0 7/14 internal.R: vetr:::ts_compare(ts.1, ts.2) $success [1] 0 $message $message$message [1] "be" "1971.92" "is" "1975.75" $message$wrap $message$wrap[[1]] tsp(NULL)[2] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::ts_compare(ts.3, ts.2) $success [1] 0 $message $message$message [1] "be" "12" "is" "4" $message$wrap $message$wrap[[1]] tsp(NULL)[3] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::ts_compare(ts.4, ts.2) $success [1] 0 $message $message$message [1] "be" "1971.92" "is" "1975.75" $message$wrap $message$wrap[[1]] tsp(NULL)[2] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::ts_compare(ts.4, ts.1) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::ts_compare(ts.1, ts.4) $success [1] 0 $message $message$message [1] "be" "12" "is" "0" $message$wrap $message$wrap[[1]] tsp(NULL)[3] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::ts_compare(ts.4, "hello") $success [1] 0 $message $message$message [1] "be" [2] "`alike` the corresponding element in target" [3] "" [4] "" $message$wrap $message$wrap[[1]] tsp(NULL) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::ts_compare("hello", 1:3) $success [1] 0 $message $message$message [1] "be" [2] "`alike` the corresponding element in target" [3] "" [4] "" $message$wrap $message$wrap[[1]] tsp(NULL) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::ts_compare(ts.1, 1:3) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::ts_compare(ts.4, 1:4) $success [1] 0 $message $message$message [1] "be" [2] "`alike` the corresponding element in target" [3] "" [4] "" $message$wrap $message$wrap[[1]] tsp(NULL) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: unitizer_sect("All Attributes, default", { 7/14 internal.R: vetr:::attr_compare(1, 1) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(matrix(integer(), 3), matrix(integer(), 3, $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(matrix(integer(), 3), matrix(integer(), 3, Error in vetr:::attr_compare(matrix(integer(), 3), matrix(integer(), 3, : Argument `mode` must be a one length integer like vector Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 7/14 internal.R: vetr:::attr_compare(matrix(integer(), 3), matrix(integer(), 3, $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(matrix(integer(), 4), matrix(integer(), 3, $success [1] 0 $message $message$message [1] "have" "4 rows" "has" "3" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 2 7/14 internal.R: vetr:::attr_compare(matrix(integer(), ncol = 4), matrix(intege $success [1] 0 $message $message$message [1] "have" "4 columns" "has" "3" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 2 7/14 internal.R: vetr:::attr_compare(matrix(integer(), 3, 3, dimnames = list(NU $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(matrix(integer(), 3, 3, dimnames = list(NU $success [1] 0 $message $message$message [1] "be" "\"b\"" "is" "\"a\"" $message$wrap $message$wrap[[1]] colnames(NULL)[1] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 5 7/14 internal.R: vetr:::attr_compare(matrix(integer(), 3, 3, dimnames = list(le $success [1] 0 $message $message$message [1] "be" "\"a\"" "is" "\"A\"" $message$wrap $message$wrap[[1]] row.names(NULL)[1] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 5 7/14 internal.R: vetr:::attr_compare(matrix(integer(), 3, 3, dimnames = list(LE $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(matrix(integer(), 3, 3, dimnames = list(A $success [1] 0 $message $message$message [1] "be" "\"A\"" "is" "\"a\"" $message$wrap $message$wrap[[1]] names(dimnames(NULL))[1] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 5 7/14 internal.R: vetr:::attr_compare(structure(list(integer(), character())), $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(structure(list(integer(), character()), cl $success [1] 1 $message NULL $df [1] 1 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(structure(unname(data.frame(integer(), cha $success [1] 1 $message NULL $df [1] 1 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(structure(list(), welp = list()), structur $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(structure(list(), welp = list(NULL)), stru $success [1] 0 $message $message$message [1] "be" "1" "is" "2" $message$wrap $message$wrap[[1]] length(attr(NULL, "welp")) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $message$wrap[[2]][[2]] [1] "welp" $df [1] 0 $lvl [1] 6 7/14 internal.R: vetr:::attr_compare(structure(list(), welp = list(), belp = 1: $success [1] 0 $message $message$message [1] "have" "attribute \"belp\"" "" [4] "" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 7 7/14 internal.R: vetr:::attr_compare(structure(list(), class = letters[1:3]), $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(structure(list(), class = letters[1:3]), $success [1] 0 $message $message$message [1] "be" "\"a\"" "is" "\"b\"" $message$wrap $message$wrap[[1]] class(NULL)[2] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(structure(list(), class = letters[2:4]), $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: unitizer_sect("All attributes, strict", { 7/14 internal.R: vetr:::attr_compare(matrix(integer(), 3), matrix(integer(), 3, $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(matrix(integer(), 3, 3), matrix(integer(), $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(matrix(integer(), 3, 3, dimnames = list(NU $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(matrix(integer(), 3, 3, dimnames = list(LE $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(matrix(integer(), 3, 3, dimnames = list(a $success [1] 0 $message $message$message [1] "be" [2] "`alike` the corresponding element in target" [3] "" [4] "" $message$wrap $message$wrap[[1]] dimnames(NULL) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 6 7/14 internal.R: vetr:::attr_compare(matrix(integer(), 3, 3, dimnames = list(A $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(structure(list(integer(), character())), $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(structure(list(integer(), character()), cl $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(structure(list(), class = letters[2:4]), $success [1] 0 $message $message$message [1] "be" "3" "is" "4" $message$wrap $message$wrap[[1]] length(class(NULL)) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 6 7/14 internal.R: vetr:::attr_compare(structure(list(integer(), character())), $success [1] 0 $message $message$message [1] "not have" "attribute \"class\"" "" [4] "" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 6 7/14 internal.R: vetr:::attr_compare(structure(list(integer(), character()), cl $success [1] 0 $message $message$message [1] "not have" "attribute \"names\"" "" [4] "" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 7 7/14 internal.R: vetr:::attr_compare(structure(list(), welp = list(NULL, 1:3), $success [1] 0 $message $message$message [1] "have" "attribute \"belp\"" "" [4] "" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 7 7/14 internal.R: vetr:::attr_compare(structure(list(), welp = list(NULL, 1:3), $success [1] 0 $message $message$message [1] "have" "attribute \"belp\"" "" [4] "" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 7 7/14 internal.R: unitizer_sect("Closures", { 7/14 internal.R: vetr:::fun_alike(print, print.data.frame) [1] TRUE 7/14 internal.R: vetr:::fun_alike(print.data.frame, print) [1] "have" [2] "argument `digits` after argument `...`" [3] "" [4] "" 7/14 internal.R: vetr:::fun_alike(summary, summary.lm) [1] TRUE 7/14 internal.R: vetr:::fun_alike(summary.lm, summary) [1] "have" [2] "argument `correlation` after argument `object`" [3] "" [4] "" 7/14 internal.R: fn0 <- function(x, y) NULL 7/14 internal.R: fn1 <- function(x, y, z) NULL 7/14 internal.R: fn2 <- function(y, x) NULL 7/14 internal.R: fn3 <- function(x = 1, y = 2) NULL 7/14 internal.R: fn4 <- function(x, ...) NULL 7/14 internal.R: fn5 <- function(x) NULL 7/14 internal.R: fn6 <- function(x, y, z, ...) NULL 7/14 internal.R: fn7 <- function(x, ..., y) NULL 7/14 internal.R: fn8 <- function(x, a, ..., g, y) NULL 7/14 internal.R: fn9 <- function(x, a, ..., g, y, w) NULL 7/14 internal.R: vetr:::fun_alike(fn0, fn1) [1] "not have" "argument `z` after argument `y`" [3] "" "" 7/14 internal.R: vetr:::fun_alike(fn1, fn0) [1] "have" "argument `z` after argument `y`" [3] "" "" 7/14 internal.R: vetr:::fun_alike(fn4, fn1) [1] "have" "a `...` argument" "" "" 7/14 internal.R: vetr:::fun_alike(fn0, fn2) [1] "have" "argument `x` as first argument" [3] "" "" 7/14 internal.R: vetr:::fun_alike(fn0, fn3) [1] TRUE 7/14 internal.R: vetr:::fun_alike(fn3, fn0) [1] "have" "argument `x` as first argument" [3] "" "" 7/14 internal.R: vetr:::fun_alike(fn4, fn5) [1] "have" "argument `...` after argument `x`" [3] "" "" 7/14 internal.R: vetr:::fun_alike(fn4, fn6) [1] TRUE 7/14 internal.R: vetr:::fun_alike(fn4, fn7) [1] TRUE 7/14 internal.R: vetr:::fun_alike(fn7, fn4) [1] "have" "argument `y` after argument `...`" [3] "" "" 7/14 internal.R: vetr:::fun_alike(fn7, fn8) [1] TRUE 7/14 internal.R: vetr:::fun_alike(fn7, fn9) [1] "not have" "argument `w` after argument `y`" [3] "" "" 7/14 internal.R: vetr:::fun_alike(`+`, `-`) [1] TRUE 7/14 internal.R: vetr:::fun_alike(substitute, function(expr, env) NULL) [1] TRUE 7/14 internal.R: vetr:::fun_alike(function(expr, env) NULL, substitute) [1] TRUE 7/14 internal.R: vetr:::fun_alike(substitute, on.exit) [1] "have" [2] "argument `env` after argument `expr`" [3] "" [4] "" 7/14 internal.R: vetr:::fun_alike(on.exit, substitute) [1] "have" "argument `expr` as first argument" [3] "" "" 7/14 internal.R: vetr:::fun_alike(`[`, substitute) Error in vetr:::fun_alike(`[`, substitute) : argument of type NILSXP is not a closure Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 7/14 internal.R: vetr:::fun_alike(`[`, `&&`) Error in vetr:::fun_alike(`[`, `&&`) : argument of type NILSXP is not a closure Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 7/14 internal.R: vetr:::fun_alike(identity, 10) Error in vetr:::fun_alike(identity, 10) : Arguments must be functions. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 7/14 internal.R: vetr:::fun_alike(10, identity) Error in vetr:::fun_alike(10, identity) : Arguments must be functions. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 7/14 internal.R: unitizer_sect("Env Track", { 7/14 internal.R: el.1 <- replicate(5, new.env()) 7/14 internal.R: el.2 <- el.1[c(1, 1, 2, 3, 4, 1, 2, 3, 5, 1)] 7/14 internal.R: vetr:::env_track(el.1, 1L) [1] 1 3 3 1 3 7/14 internal.R: vetr:::env_track(el.2, 1L) [1] 1 0 1 3 1 0 0 0 1 0 7/14 internal.R: vetr:::env_track(el.1, 1L, 3L) [1] 1 3 -1 -1 -1 7/14 internal.R: vetr:::env_track(list(1, 2, 3), 1L, 3L) Error in vetr:::env_track(list(1, 2, 3), 1L, 3L) : All contents of `env` should be environments; error at item 1 Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 7/14 internal.R: unitizer_sect("valid names", { 7/14 internal.R: vetr:::is_valid_name("hello") [1] TRUE 7/14 internal.R: vetr:::is_valid_name(".hello") [1] TRUE 7/14 internal.R: vetr:::is_valid_name("123") [1] FALSE 7/14 internal.R: vetr:::is_valid_name("hello there") [1] FALSE 7/14 internal.R: vetr:::is_valid_name("h1ello") [1] TRUE 7/14 internal.R: vetr:::is_valid_name("_hello") [1] FALSE 7/14 internal.R: vetr:::is_valid_name(".1fail") [1] FALSE 7/14 internal.R: vetr:::is_valid_name("NULL") [1] FALSE 7/14 internal.R: vetr:::is_valid_name("FALSE") [1] FALSE 7/14 internal.R: vetr:::is_valid_name(letters) Error in vetr:::is_valid_name(letters) : Argument `name` must be character(1L) Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 7/14 internal.R: unitizer_sect("Is dfish", { 7/14 internal.R: df1 <- list(a = 1:10, b = letters[1:10]) 7/14 internal.R: df2 <- list(a = 1:10, b = letters[1:9]) 7/14 internal.R: vetr:::is_dfish(df1) [1] TRUE 7/14 internal.R: vetr:::is_dfish(df2) [1] FALSE 7/14 internal.R: vetr:::is_dfish(1:10) [1] FALSE 7/14 internal.R: unitizer_sect("syntactic", { 7/14 internal.R: vetr:::syntactic_names(quote(hello)) [1] TRUE 7/14 internal.R: vetr:::syntactic_names(quote(`hello there`)) [1] FALSE 7/14 internal.R: vetr:::syntactic_names(quote(1 + 1)) [1] TRUE 7/14 internal.R: vetr:::syntactic_names(quote(1 %hello there% 1)) [1] TRUE 7/14 internal.R: vetr:::syntactic_names(quote(1 + `hello there`)) [1] FALSE 7/14 internal.R: vetr:::syntactic_names(quote(-(1:3))) [1] TRUE 7/14 internal.R: vetr:::syntactic_names(quote(c(-1:1, NA_integer_))) [1] TRUE 7/14 internal.R: vetr:::syntactic_names(quote(a == 25)) [1] TRUE 7/14 internal.R: vetr:::syntactic_names(quote(all(-1:1 > 0))) [1] TRUE 7/14 internal.R: unitizer_sect("Pad or Quote", { 7/14 internal.R: vetr:::pad_or_quote(quote(1 + 1)) [1] "`1 + 1`" 7/14 internal.R: vetr:::pad_or_quote(quote(!anyNA(1 + 1))) [1] "`!anyNA(1 + 1)`" 7/14 internal.R: vetr:::pad_or_quote(quote(1 + 1), syntactic = 0L) [1] "{1 + 1}" 7/14 internal.R: vetr:::pad_or_quote(quote(1 + 1), syntactic = 1L) [1] "`1 + 1`" 7/14 internal.R: unitizer_sect("Merge messages", { 7/14 internal.R: vetr:::msg_sort(list(letters[5:1], letters[1:5])) [[1]] [1] "a" "b" "c" "d" "e" [[2]] [1] "e" "d" "c" "b" "a" 7/14 internal.R: vetr:::msg_sort(list(c("a", "a", "a", "z", "b"), c("a", "a", [[1]] [1] "a" "a" "z" "b" "b" [[2]] [1] "a" "a" "a" "z" "b" 7/14 internal.R: vetr:::msg_sort(list(letters[5:1])) [[1]] [1] "e" "d" "c" "b" "a" 7/14 internal.R: vetr:::msg_sort(as.list(letters[5:1])) [[1]] [1] "a" [[2]] [1] "b" [[3]] [1] "c" [[4]] [1] "d" [[5]] [1] "e" 7/14 internal.R: vetr:::msg_sort(list(letters[1:5], NULL)) Error in vetr:::msg_sort(list(letters[1:5], NULL)) : Internal Error: unexpected string format to merge; contact maintainer Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 7/14 internal.R: vetr:::msg_sort(letters) Error in vetr:::msg_sort(letters) : Expected list argument, got character Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 7/14 internal.R: msgs <- list(c("`my_var`", "be", "integer", "is", "character") 7/14 internal.R: vetr:::msg_merge(msgs) [[1]] [1] "`attr(my_var)`" "be" "\"NULL\"" "is" [5] "list" [[2]] [1] "`length(names(my_var))`" "be" [3] "2, or 3" "is" [5] "4" [[3]] [1] "`my_var`" "be" [3] "\"NULL\", integer, or matrix" "is" [5] "character" [[4]] [1] "`my_var`" "have" "3 columns" "has" "1" 7/14 internal.R: vetr:::msg_merge(msgs[1:3]) [[1]] [1] "`length(names(my_var))`" "be" [3] "2" "is" [5] "4" [[2]] [1] "`my_var`" "be" "integer" "is" "character" [[3]] [1] "`my_var`" "have" "3 columns" "has" "1" 7/14 internal.R: vetr:::msg_merge(msgs[1]) [[1]] [1] "`my_var`" "be" "integer" "is" "character" 7/14 internal.R: vetr:::msg_merge_2(msgs) [[1]] [1] "`attr(my_var)` should be \"NULL\" (is list)" [[2]] [1] "`length(names(my_var))` should be 2, or 3 (is 4)" [[3]] [1] "`my_var` should be \"NULL\", integer, or matrix (is character)" [[4]] [1] "`my_var` should have 3 columns (has 1)" 7/14 internal.R: unitizer_sect("Hash", { 7/14 internal.R: keys <- vapply(1:26, function(x) paste0(letters[seq(x)], colla 7/14 internal.R: values <- vapply(1:26, function(x) paste0(LETTERS[seq(x)], col 7/14 internal.R: vetr:::hash_test(keys, values) [1] "A" "AB" [3] "ABC" "ABCD" [5] "ABCDE" "ABCDEF" [7] "ABCDEFG" "ABCDEFGH" [9] "ABCDEFGHI" "ABCDEFGHIJ" [11] "ABCDEFGHIJK" "ABCDEFGHIJKL" [13] "ABCDEFGHIJKLM" "ABCDEFGHIJKLMN" [15] "ABCDEFGHIJKLMNO" "ABCDEFGHIJKLMNOP" [17] "ABCDEFGHIJKLMNOPQ" "ABCDEFGHIJKLMNOPQR" [19] "ABCDEFGHIJKLMNOPQRS" "ABCDEFGHIJKLMNOPQRST" [21] "ABCDEFGHIJKLMNOPQRSTU" "ABCDEFGHIJKLMNOPQRSTUV" [23] "ABCDEFGHIJKLMNOPQRSTUVW" "ABCDEFGHIJKLMNOPQRSTUVWX" [25] "ABCDEFGHIJKLMNOPQRSTUVWXY" "ABCDEFGHIJKLMNOPQRSTUVWXYZ" 7/14 internal.R: vetr:::track_hash(letters[1:3], 2L) [1] 1 1 4 7/14 internal.R: vetr:::track_hash(letters[1:5], 2L) [1] 1 1 4 1 8 7/14 internal.R: vetr:::track_hash(c("a", "b", "b"), 2L) [1] 1 1 0 7/14 internal.R: vetr:::track_hash(c("a", "b", NA, 1, "b"), 2L) [1] 1 1 NA 1 1 7/14 internal.R: vetr:::track_hash(c("a", "b", NA, 1, "a"), 2L) [1] 1 1 NA 1 0 7/14 internal.R: keys <- c("a", "b", NA, 1, "b", "hello", "goodbye", "a", NA, 7/14 internal.R: vetr:::track_hash(keys, 8L) [1] 1 1 NA 1 1 1 1 0 NA 3 0 1 0 7/14 internal.R: collisions <- c("f b", "n b", "n d", "t m", "b r", "n w", "q w 7/14 internal.R: keys.1 <- c(collisions, NA, 0, collisions) 7/14 internal.R: vetr:::track_hash(keys.1, 64L) [1] 1 1 1 1 1 1 1 1 NA 0 1 1 1 1 1 1 1 1 7/14 internal.R: keys.2 <- c(collisions, NA, 4, collisions) 7/14 internal.R: vetr:::track_hash(keys.2, 64L) [1] 1 1 1 1 1 1 1 1 NA 4 0 0 0 0 1 1 1 1 7/14 internal.R: vetr:::hash_test2(c(collisions[1:3], collisions[1:3], "hello") [1] 0 0 0 0 0 0 -1 7/14 internal.R: unitizer_sect("Mode", { 7/14 internal.R: vetr:::alike_mode(NULL) [1] "NULL" 7/14 internal.R: vetr:::alike_mode(quote(a)) [1] "name" 7/14 internal.R: vetr:::alike_mode(mean) [1] "function" 7/14 internal.R: vetr:::alike_mode(`+`) [1] "function" 7/14 internal.R: vetr:::alike_mode(log) [1] "function" 7/14 internal.R: vetr:::alike_mode(quote(1 + 1)) [1] "call" 7/14 internal.R: unitizer_sect("Find funs", { 7/14 internal.R: fun <- function(x, y) NULL 7/14 internal.R: vetr:::find_fun(quote(fun), environment()) function(x, y) NULL <environment: 0x55c4972e8770> 7/14 internal.R: vetr:::find_fun(quote(asdhfqwerasdfasdf), environment()) NULL 7/14 internal.R: fun2 <- function(x) vetr:::find_fun(quote(x), environment()) 7/14 internal.R: (fun2()) NULL 8/14 language.R: 8/14 language.R: library(vetr) 8/14 language.R: unitizer_sect("Match Calls", { 8/14 language.R: vetr:::match_call_alike(quote(var(y = 1:10, runif(10))), basee var(y = 1:10, runif(10)) 8/14 language.R: env0 <- new.env() 8/14 language.R: env0$var <- function(yollo, zambia) NULL 8/14 language.R: vetr:::match_call_alike(quote(var(y = 1:10, runif(10))), env0) var(yollo = 1:10, zambia = runif(10)) 8/14 language.R: unitizer_sect("Calls", { 8/14 language.R: c0 <- quote(fun(a, b, a, 25)) 8/14 language.R: c1 <- quote(fun(x, y, x, "hello")) 8/14 language.R: c2 <- quote(fun(x, y, z, "hello")) 8/14 language.R: c3 <- quote(FUN(x, y, x, 1.01)) 8/14 language.R: c4 <- quote(fun(x, y, x, z)) 8/14 language.R: c5 <- quote(fun(a + b + a, FUN(z, a + 1))) 8/14 language.R: c6 <- quote(fun(x + y + x, FUN(w, x + 2))) 8/14 language.R: c7 <- quote(fun(x + y + x, FUN(w, y + 2))) 8/14 language.R: c8 <- quote(fun(x + y + x, FUN(w, x - 2))) 8/14 language.R: c9 <- quote(fun(x + y + x, FUN(w, x + "hello"))) 8/14 language.R: c10 <- quote(fun(1)) 8/14 language.R: c11 <- quote(fun(1, 2)) 8/14 language.R: c12 <- quote(a + b + c) 8/14 language.R: c13 <- quote((a + b) + c) 8/14 language.R: c14 <- quote(a + (b + c)) 8/14 language.R: vetr:::lang_alike(c0, c1, NULL) $success [1] TRUE $message NULL $call.match NULL $call.ind NULL $call.ind.sub.par NULL $call.orig NULL 8/14 language.R: vetr:::lang_alike(c0, c2, NULL) $success [1] FALSE $message $message$message [1] "be" "`x`" "is" "`z`" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match fun(x, y, z, "hello") $call.ind NULL[[4]] $call.ind.sub.par $call.ind.sub.par[[1]] NULL $call.ind.sub.par[[2]] [1] 4 $call.orig fun(x, y, z, "hello") 8/14 language.R: vetr:::lang_alike(c0, c3, NULL) $success [1] FALSE $message $message$message [1] "be" "a call to `fun`" "is" "a call to `FUN`" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match FUN(x, y, x, 1.01) $call.ind NULL[[1]] $call.ind.sub.par $call.ind.sub.par[[1]] NULL $call.ind.sub.par[[2]] [1] 1 $call.orig FUN(x, y, x, 1.01) 8/14 language.R: vetr:::lang_alike(c0, c4, NULL) $success [1] FALSE $message $message$message [1] "be" "\"double\"" "is" "\"symbol\"" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match fun(x, y, x, z) $call.ind NULL[[5]] $call.ind.sub.par $call.ind.sub.par[[1]] NULL $call.ind.sub.par[[2]] [1] 5 $call.orig fun(x, y, x, z) 8/14 language.R: vetr:::lang_alike(c5, c6, NULL) $success [1] TRUE $message NULL $call.match NULL $call.ind NULL $call.ind.sub.par NULL $call.orig NULL 8/14 language.R: vetr:::lang_alike(c5, c7, NULL) $success [1] FALSE $message $message$message [1] "be" "`x`" "is" "`y`" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match fun(x + y + x, FUN(w, y + 2)) $call.ind NULL[[3]][[3]][[2]] $call.ind.sub.par $call.ind.sub.par[[1]] NULL $call.ind.sub.par[[2]] [1] 3 $call.orig fun(x + y + x, FUN(w, y + 2)) 8/14 language.R: vetr:::lang_alike(c5, c8, NULL) $success [1] FALSE $message $message$message [1] "be" "a call to `+`" "is" "a call to `-`" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match fun(x + y + x, FUN(w, x - 2)) $call.ind NULL[[3]][[3]][[1]] $call.ind.sub.par $call.ind.sub.par[[1]] NULL $call.ind.sub.par[[2]] [1] 3 $call.orig fun(x + y + x, FUN(w, x - 2)) 8/14 language.R: vetr:::lang_alike(c5, c9, NULL) $success [1] TRUE $message NULL $call.match NULL $call.ind NULL $call.ind.sub.par NULL $call.orig NULL 8/14 language.R: vetr:::lang_alike(c11, c10, NULL) $success [1] FALSE $message $message$message [1] "have" "2 arguments" "has" "1" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match fun(1) $call.ind NULL $call.ind.sub.par NULL $call.orig fun(1) 8/14 language.R: vetr:::lang_alike(c12, c13) $success [1] TRUE $message NULL $call.match NULL $call.ind NULL $call.ind.sub.par NULL $call.orig NULL 8/14 language.R: vetr:::lang_alike(c12, c14) $success [1] FALSE $message $message$message [1] "be" "a call to `+`" "is" "\"symbol\"" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match a + (b + c) $call.ind NULL[[2]] $call.ind.sub.par $call.ind.sub.par[[1]] NULL $call.ind.sub.par[[2]] [1] 2 $call.orig a + (b + c) 8/14 language.R: vetr:::lang_alike(c13, c14) $success [1] FALSE $message $message$message [1] "be" "a call to `+`" "is" "\"symbol\"" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match a + (b + c) $call.ind NULL[[2]] $call.ind.sub.par $call.ind.sub.par[[1]] NULL $call.ind.sub.par[[2]] [1] 2 $call.orig a + (b + c) 8/14 language.R: vetr:::lang_alike(c14, c13) $success [1] FALSE $message $message$message [1] "be" "\"symbol\"" "is" "\"language\"" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match (a + b) + c $call.ind NULL[[2]][[2]] $call.ind.sub.par $call.ind.sub.par[[1]] NULL $call.ind.sub.par[[2]] [1] 2 $call.orig (a + b) + c 8/14 language.R: fun <- function(abc, bcd, efg) NULL 8/14 language.R: ca <- quote(fun(a, b, a)) 8/14 language.R: cb <- quote(fun(x, e = x, y)) 8/14 language.R: vetr:::lang_alike(ca, cb, NULL) $success [1] FALSE $message $message$message [1] "not be" "`x`" "" "" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match fun(x, e = x, y) $call.ind NULL$e $call.ind.sub.par $call.ind.sub.par[[1]] NULL $call.ind.sub.par[[2]] e $call.orig fun(x, e = x, y) 8/14 language.R: vetr:::lang_alike(cb, ca, NULL) $success [1] FALSE $message $message$message [1] "have" "argument `e` after argument 1" [3] "has" "unnamed argument" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match fun(a, b, a) $call.ind NULL $call.ind.sub.par NULL $call.orig fun(a, b, a) 8/14 language.R: vetr:::lang_alike(ca, cb) $success [1] TRUE $message NULL $call.match NULL $call.ind NULL $call.ind.sub.par NULL $call.orig NULL 8/14 language.R: ca.1 <- ca 8/14 language.R: cb.1 <- cb 8/14 language.R: ca.1[[1]] <- fun 8/14 language.R: cb.1[[1]] <- fun 8/14 language.R: vetr:::lang_alike(ca.1, cb.1) $success [1] TRUE $message NULL $call.match NULL $call.ind NULL $call.ind.sub.par NULL $call.orig NULL 8/14 language.R: cc <- quote(fun(a, b, fun(b = 1))) 8/14 language.R: cd <- quote(fun(a, b, fun(c = 1))) 8/14 language.R: vetr:::lang_alike(cc, cd) $success [1] FALSE $message $message$message [1] "have" "argument `bcd` as first argument" [3] "has" "`c`" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match fun(abc = a, bcd = b, efg = fun(c = 1)) $call.ind NULL[[4]] $call.ind.sub.par $call.ind.sub.par[[1]] NULL $call.ind.sub.par[[2]] [1] 4 $call.orig fun(a, b, fun(c = 1)) 8/14 language.R: ce <- quote(fun(a, b, NULL)) 8/14 language.R: vetr:::lang_alike(cc, ce) $success [1] FALSE $message $message$message [1] "be" "a call to `fun`" "is" "\"NULL\"" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match fun(abc = a, bcd = b, efg = NULL) $call.ind NULL[[4]] $call.ind.sub.par $call.ind.sub.par[[1]] NULL $call.ind.sub.par[[2]] [1] 4 $call.orig fun(a, b, NULL) 8/14 language.R: vetr:::lang_alike(ce, cc) $success [1] TRUE $message NULL $call.match NULL $call.ind NULL $call.ind.sub.par NULL $call.orig NULL 8/14 language.R: da <- quote(ff(a = 1, b = 2, c = 3)) 8/14 language.R: db <- quote(ff(a = 1, d = 2, c = 3)) 8/14 language.R: vetr:::lang_alike(da, db) $success [1] FALSE $message $message$message [1] "have" "argument `b` after argument `a`" [3] "has" "`d`" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match ff(a = 1, d = 2, c = 3) $call.ind NULL $call.ind.sub.par NULL $call.orig ff(a = 1, d = 2, c = 3) 8/14 language.R: vetr:::lang_alike(cc, 1:10) Error in vetr:::lang_alike(cc, 1:10) : Arguments must be LANGSXP, SYMSXP, or R_NilValue Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 8/14 language.R: vetr:::lang_alike(ce, cc, match.call.env = 1:10) Error in vetr:::lang_alike(ce, cc, match.call.env = 1:10) : Argument `match.call.env` must be an environment or NULL Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 8/14 language.R: unitizer_sect("Calls as char", { 8/14 language.R: vetr:::lang_alike_chr(c0, c1, NULL) [1] "" 8/14 language.R: vetr:::lang_alike_chr(c0, c2, NULL) [1] "be" "`x`" "is" "`z`" 8/14 language.R: vetr:::lang_alike_chr(c0, c3, NULL) [1] "be" "a call to `fun`" "is" "a call to `FUN`" 8/14 language.R: vetr:::lang_alike_chr(c0, c4, NULL) [1] "be" "\"double\"" "is" "\"symbol\"" 8/14 language.R: vetr:::lang_alike_chr(c5, c6, NULL) [1] "" 8/14 language.R: vetr:::lang_alike_chr(c5, c7, NULL) [1] "be" "`x`" "is" "`y`" 8/14 language.R: vetr:::lang_alike_chr(c5, c8, NULL) [1] "be" "a call to `+`" "is" "a call to `-`" 8/14 language.R: vetr:::lang_alike_chr(c5, c9, NULL) [1] "" 8/14 language.R: vetr:::lang_alike_chr(ca, cb, NULL) [1] "not be" "`x`" "" "" 8/14 language.R: vetr:::lang_alike_chr(cb, ca, NULL) [1] "have" "argument `e` after argument 1" [3] "has" "unnamed argument" 8/14 language.R: vetr:::lang_alike_chr(ca, cb) [1] "" 8/14 language.R: vetr:::lang_alike_chr(cc, cd) [1] "have" "argument `bcd` as first argument" [3] "has" "`c`" 8/14 language.R: vetr:::lang_alike_chr(cc, ce) [1] "be" "a call to `fun`" "is" "\"NULL\"" 8/14 language.R: vetr:::lang_alike_chr(ce, cc) [1] "" 8/14 language.R: unitizer_sect("Formulas", { 8/14 language.R: f0 <- y ~ x + 1 8/14 language.R: f1 <- a ~ b + 1 8/14 language.R: f2 <- a ~ b + 2 8/14 language.R: f3 <- y ~ x + log(x) + z - 1 8/14 language.R: f4 <- a ~ b + log(b) + c - 1 8/14 language.R: f5 <- a ~ b + log(c) + b - 1 8/14 language.R: f6 <- a ~ b + ln(b) + c - 1 8/14 language.R: f7 <- a ~ b + log(b) + c + 1 8/14 language.R: vetr:::lang_alike(f0, f1, NULL) $success [1] TRUE $message NULL $call.match NULL $call.ind NULL $call.ind.sub.par NULL $call.orig NULL 8/14 language.R: vetr:::lang_alike(f0, f2, NULL) $success [1] FALSE $message $message$message [1] "have" "identical constant values" [3] "" "" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match a ~ b + 2 <environment: 0x55c49a7c3a68> $call.ind NULL[[3]][[3]] $call.ind.sub.par $call.ind.sub.par[[1]] NULL $call.ind.sub.par[[2]] [1] 3 $call.orig a ~ b + 2 <environment: 0x55c49a7c3a68> 8/14 language.R: vetr:::lang_alike(f3, f4, NULL) $success [1] TRUE $message NULL $call.match NULL $call.ind NULL $call.ind.sub.par NULL $call.orig NULL 8/14 language.R: vetr:::lang_alike(f3, f5, NULL) $success [1] FALSE $message $message$message [1] "be" "`b`" "is" "`c`" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match a ~ b + log(c) + b - 1 <environment: 0x55c49a7c3a68> $call.ind NULL[[3]][[2]][[2]][[3]][[2]] $call.ind.sub.par $call.ind.sub.par[[1]] NULL $call.ind.sub.par[[2]] [1] 3 $call.orig a ~ b + log(c) + b - 1 <environment: 0x55c49a7c3a68> 8/14 language.R: vetr:::lang_alike(f3, f6, NULL) $success [1] FALSE $message $message$message [1] "be" "a call to `log`" "is" "a call to `ln`" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match a ~ b + ln(b) + c - 1 <environment: 0x55c49a7c3a68> $call.ind NULL[[3]][[2]][[2]][[3]][[1]] $call.ind.sub.par $call.ind.sub.par[[1]] NULL $call.ind.sub.par[[2]] [1] 3 $call.orig a ~ b + ln(b) + c - 1 <environment: 0x55c49a7c3a68> 8/14 language.R: vetr:::lang_alike(f3, f7, NULL) $success [1] FALSE $message $message$message [1] "be" "a call to `-`" "is" "a call to `+`" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match a ~ b + log(b) + c + 1 <environment: 0x55c49a7c3a68> $call.ind NULL[[3]][[1]] $call.ind.sub.par $call.ind.sub.par[[1]] NULL $call.ind.sub.par[[2]] [1] 3 $call.orig a ~ b + log(b) + c + 1 <environment: 0x55c49a7c3a68> 8/14 language.R: unitizer_sect("Deparse", { 8/14 language.R: l0 <- quote(a + b + fun(x + funz(matrix_over[25, 32]) + transf 8/14 language.R: (dep.txt <- vetr:::dep_alike(l0)) [1] "a + b + fun(x + funz(matrix_over[25, 32]) + transform(iris, x = Sepal.Width * " [2] " 3)/the_donkey_ate_a_carrot %in% {" [3] " paste0(match(letter, LETTERS), c(\"hello there\"))" [4] "})" 8/14 language.R: vetr:::dep_alike(l0, 30) [1] "a + b + fun(x + funz(matrix_over[25, " [2] " 32]) + transform(iris, x = Sepal.Width * " [3] " 3)/the_donkey_ate_a_carrot %in% " [4] " {" [5] " paste0(match(letter, LETTERS), " [6] " c(\"hello there\"))" [7] " })" 8/14 language.R: vetr:::pad(dep.txt) [1] "> a + b + fun(x + funz(matrix_over[25, 32]) + transform(iris, x = Sepal.Width * \n+ 3)/the_donkey_ate_a_carrot %in% {\n+ paste0(match(letter, LETTERS), c(\"hello there\"))\n+ })\n" 8/14 language.R: old.opt <- options(prompt = ">>", continue = " |") 8/14 language.R: vetr:::pad(dep.txt) [1] ">>a + b + fun(x + funz(matrix_over[25, 32]) + transform(iris, x = Sepal.Width * \n | 3)/the_donkey_ate_a_carrot %in% {\n | paste0(match(letter, LETTERS), c(\"hello there\"))\n |})\n" 8/14 language.R: options(old.opt) 8/14 language.R: vetr:::pad(dep.txt, pad = 4) [1] " a + b + fun(x + funz(matrix_over[25, 32]) + transform(iris, x = Sepal.Width * \n 3)/the_donkey_ate_a_carrot %in% {\n paste0(match(letter, LETTERS), c(\"hello there\"))\n })\n" 8/14 language.R: vetr:::pad(dep.txt, pad = 4, lines = 2) [1] " a + b + fun(x + funz(matrix_over[25, 32]) + transform(iris, x = Sepal.Width * \n 3)/the_donkey_ate_a_carrot %in% {...\n" 8/14 language.R: vetr:::dep_oneline(quote(1 + 1 + 3 + 944254235), 10) [1] "1 + 1 + .." 8/14 language.R: vetr:::dep_oneline(quote(1 + 1 + 3), 10) [1] "1 + 1 + 3" 8/14 language.R: vetr:::dep_oneline(quote(1 + 1 + 3), "hello") Warning in vetr:::dep_oneline(quote(1 + 1 + 3), "hello") : NAs introduced by coercion Error in vetr:::dep_oneline(quote(1 + 1 + 3), "hello") : Internal Error: arg max_chars and keep_at_end must be positive Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 8/14 language.R: vetr:::dep_oneline(quote(1 + 1 + 3 - (mean(1:10) + 3)), 15, 1L [1] "1 + 1 + 3 - ..)" 9/14 misc.R: 9/14 misc.R: library(vetr) 9/14 misc.R: unitizer_sect("All", { 9/14 misc.R: vetr:::val_all(1:10) [1] -2 9/14 misc.R: vetr:::val_all(rep(TRUE, 10)) [1] 1 9/14 misc.R: vetr:::val_all(c(rep(TRUE, 10), FALSE, TRUE)) [1] 0 9/14 misc.R: vetr:::val_all(c(rep(TRUE, 5), NA, rep(TRUE, 5))) [1] -4 9/14 misc.R: vetr:::val_all(FALSE) [1] -1 9/14 misc.R: vetr:::val_all(TRUE) [1] 2 9/14 misc.R: vetr:::val_all(logical()) [1] 3 9/14 misc.R: vetr:::val_all(NA) [1] -3 9/14 misc.R: vetr:::val_all(c(TRUE, TRUE, NA, TRUE)) [1] -4 9/14 misc.R: unitizer_sect("Hash", { 9/14 misc.R: vetr:::hash_fun(c("f b", "n b", "n d", "t m", "b r", "n w", "q w", [1] 193 193 193 193 193 193 193 193 9/14 misc.R: unitizer_sect("bench_mark", { 9/14 misc.R: capt_wo_time <- function(x) { 9/14 misc.R: capt_wo_time(bench_mark(Sys.sleep(1.2), times = 1)) [1] "Mean eval time from 1 iteration, in seconds:" [2] " Sys.sleep(1.2) ~" 9/14 misc.R: capt_wo_time(bench_mark(Sys.sleep(0.01), times = 10)) [1] "Mean eval time from 10 iterations, in milliseconds:" [2] " Sys.sleep(0.01) ~" 9/14 misc.R: capt_wo_time(bench_mark(1 + 1, NULL, times = 100)) [1] "Mean eval time from 100 iterations, in microseconds:" [2] " 1 + 1 ~" [3] " NULL ~" 9/14 misc.R: unitizer_sect("sort pair lists", { 9/14 misc.R: vetr:::list_as_sorted_vec(pairlist(c = 1, a = list(), b = NULL)) $a list() $b NULL $c [1] 1 9/14 misc.R: vetr:::list_as_sorted_vec(pairlist(b = 1, 2, a = 3)) [[1]] [1] 2 $a [1] 3 $b [1] 1 9/14 misc.R: vetr:::list_as_sorted_vec(pairlist()) list() 9/14 misc.R: vetr:::list_as_sorted_vec(pairlist(a = 1)) $a [1] 1 10/14 parse.R: 10/14 parse.R: library(vetr) 10/14 parse.R: unitizer_sect("name_sub", { 10/14 parse.R: vetr:::name_sub(quote(.), quote(xyz)) xyz 10/14 parse.R: vetr:::name_sub(quote(.), quote(x + yz)) x + yz 10/14 parse.R: vetr:::name_sub(quote(.), c(1:3)) [1] 1 2 3 10/14 parse.R: vetr:::name_sub(quote(..), quote(xyz)) . 10/14 parse.R: vetr:::name_sub(quote(...), quote(xyz)) .. 10/14 parse.R: vetr:::name_sub(quote(.zzz), quote(xyz)) .zzz 10/14 parse.R: vetr:::name_sub(quote(zzz.), quote(xyz)) zzz. 10/14 parse.R: vetr:::name_sub(quote(zzz), quote(xyz)) zzz 10/14 parse.R: vetr:::name_sub(quote(a + b), quote(xyz)) a + b 10/14 parse.R: vetr:::name_sub(quote(. + .), quote(xyz)) . + . 10/14 parse.R: vetr:::name_sub(quote(.(zzz)), quote(xyz)) .(zzz) 10/14 parse.R: vetr:::name_sub("hello", quote(xyz)) [1] "hello" 10/14 parse.R: unitizer_sect("remove parens", { 10/14 parse.R: vetr:::remove_parens(quote((a))) [[1]] a [[2]] [1] 0 10/14 parse.R: vetr:::remove_parens(quote(.(a))) [[1]] a [[2]] [1] 1 10/14 parse.R: vetr:::remove_parens(quote((((a))))) [[1]] a [[2]] [1] 0 10/14 parse.R: vetr:::remove_parens(quote((.((.(a)))))) [[1]] a [[2]] [1] 1 10/14 parse.R: vetr:::remove_parens(quote((a) && .(a))) [[1]] (a) && .(a) [[2]] [1] 0 10/14 parse.R: unitizer_sect("parse", { 10/14 parse.R: x <- quote(.(.) && ((a))) 10/14 parse.R: vetr:::parse_validator(x, quote(arg_to_validate)) [[1]] NULL && a [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [1] 10 [[2]][[3]] [1] 999 [[3]] arg_to_validate && a 10/14 parse.R: (x) .(.) && ((a)) 10/14 parse.R: vetr:::parse_validator(quote(FALSE), quote(arg_to_validate)) [[1]] [1] FALSE [[2]] [1] 999 [[3]] [1] FALSE 10/14 parse.R: vetr:::parse_validator(quote(((FALSE))), quote(arg_to_validate)) [[1]] [1] FALSE [[2]] [1] 999 [[3]] [1] FALSE 10/14 parse.R: vetr:::parse_validator(quote(((FALSE && ((TRUE))))), quote(arg_to [[1]] FALSE && TRUE [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [1] 999 [[2]][[3]] [1] 999 [[3]] FALSE && TRUE 10/14 parse.R: vetr:::parse_validator(quote(.(FALSE)), quote(arg_to_validate)) [[1]] [1] FALSE [[2]] [1] 10 [[3]] [1] FALSE 10/14 parse.R: vetr:::parse_validator(quote(.), quote(arg_to_validate)) [[1]] NULL [[2]] [1] 10 [[3]] arg_to_validate 10/14 parse.R: vetr:::parse_validator(quote(. && a), quote(arg_to_validate)) [[1]] NULL && a [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [1] 10 [[2]][[3]] [1] 999 [[3]] arg_to_validate && a 10/14 parse.R: vetr:::parse_validator(quote(.(.)), quote(arg_to_validate)) [[1]] NULL [[2]] [1] 10 [[3]] arg_to_validate 10/14 parse.R: vetr:::parse_validator(quote(((a && b) || .(.))), quote(arg_to_va [[1]] a && b || NULL [[2]] [[2]][[1]] [1] 2 [[2]][[2]] [[2]][[2]][[1]] [1] 1 [[2]][[2]][[2]] [1] 999 [[2]][[2]][[3]] [1] 999 [[2]][[3]] [1] 10 [[3]] a && b || arg_to_validate 10/14 parse.R: vetr:::parse_validator(quote(matrix(nrow = 3)), quote(arg_to_vali [[1]] matrix(nrow = 3) [[2]] [[2]][[1]] [1] 999 [[2]][[2]] [1] 999 [[3]] matrix(nrow = 3) 10/14 parse.R: vetr:::parse_validator(quote(matrix(nrow = 3) && .(.)), quote(arg [[1]] matrix(nrow = 3) && NULL [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [[2]][[2]][[1]] [1] 999 [[2]][[2]][[2]] [1] 999 [[2]][[3]] [1] 10 [[3]] matrix(nrow = 3) && arg_to_validate 10/14 parse.R: vetr:::parse_validator(quote((a || ((b && c))) && .(a + .)), [[1]] (a || b && c) && a + NULL [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [[2]][[2]][[1]] [1] 2 [[2]][[2]][[2]] [1] 999 [[2]][[2]][[3]] [[2]][[2]][[3]][[1]] [1] 1 [[2]][[2]][[3]][[2]] [1] 999 [[2]][[2]][[3]][[3]] [1] 999 [[2]][[3]] [[2]][[3]][[1]] [1] 10 [[2]][[3]][[2]] [1] 10 [[2]][[3]][[3]] [1] 10 [[3]] (a || b && c) && a + arg_to_validate 10/14 parse.R: vetr:::parse_validator(quote((a || ((b && .(c)))) && (a + .(.))), [[1]] (a || b && c) && a + NULL [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [[2]][[2]][[1]] [1] 2 [[2]][[2]][[2]] [1] 999 [[2]][[2]][[3]] [[2]][[2]][[3]][[1]] [1] 1 [[2]][[2]][[3]][[2]] [1] 999 [[2]][[2]][[3]][[3]] [1] 10 [[2]][[3]] [[2]][[3]][[1]] [1] 10 [[2]][[3]][[2]] [1] 999 [[2]][[3]][[3]] [1] 10 [[3]] (a || b && c) && a + arg_to_validate 10/14 parse.R: vetr:::parse_validator(quote(a && (b + .(c))), quote(arg_to_valid [[1]] a && b + c [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [1] 999 [[2]][[3]] [[2]][[3]][[1]] [1] 10 [[2]][[3]][[2]] [1] 999 [[2]][[3]][[3]] [1] 10 [[3]] a && b + c 10/14 parse.R: vetr:::parse_validator(quote(a && .), "hello") [[1]] a && NULL [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [1] 999 [[2]][[3]] [1] 10 [[3]] a && "hello" 10/14 parse.R: unitizer_sect("token sub", { 10/14 parse.R: vetr:::symb_sub(INT.1) integer(1L) && NO.NA && NO.INF 10/14 parse.R: vetr:::symb_sub(NO.NA) !is.na(.) attr(,"err.msg") [1] "%s should not contain NAs, but does" 10/14 parse.R: unitizer_sect("preset tokens", { 10/14 parse.R: x <- quote(integer(1L)) 10/14 parse.R: y <- quote(integer(1L) || NULL) 10/14 parse.R: z <- quote(integer(1L) && .(!any(is.na(.)))) 10/14 parse.R: vetr:::parse_validator(quote(x), quote(w)) [[1]] integer(1L) [[2]] [[2]][[1]] [1] 999 [[2]][[2]] [1] 999 [[3]] integer(1L) 10/14 parse.R: vetr:::parse_validator(quote(y), quote(w)) [[1]] integer(1L) || NULL [[2]] [[2]][[1]] [1] 2 [[2]][[2]] [[2]][[2]][[1]] [1] 999 [[2]][[2]][[2]] [1] 999 [[2]][[3]] [1] 999 [[3]] integer(1L) || NULL 10/14 parse.R: vetr:::parse_validator(quote(z), quote(w)) [[1]] integer(1L) && !any(is.na(NULL)) [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [[2]][[2]][[1]] [1] 999 [[2]][[2]][[2]] [1] 999 [[2]][[3]] [[2]][[3]][[1]] [1] 10 [[2]][[3]][[2]] [[2]][[3]][[2]][[1]] [1] 10 [[2]][[3]][[2]][[2]] [[2]][[3]][[2]][[2]][[1]] [1] 10 [[2]][[3]][[2]][[2]][[2]] [1] 10 [[3]] integer(1L) && !any(is.na(w)) 10/14 parse.R: vetr:::parse_validator(quote(z || NULL), quote(w)) [[1]] integer(1L) && !any(is.na(NULL)) || NULL [[2]] [[2]][[1]] [1] 2 [[2]][[2]] [[2]][[2]][[1]] [1] 1 [[2]][[2]][[2]] [[2]][[2]][[2]][[1]] [1] 999 [[2]][[2]][[2]][[2]] [1] 999 [[2]][[2]][[3]] [[2]][[2]][[3]][[1]] [1] 10 [[2]][[2]][[3]][[2]] [[2]][[2]][[3]][[2]][[1]] [1] 10 [[2]][[2]][[3]][[2]][[2]] [[2]][[2]][[3]][[2]][[2]][[1]] [1] 10 [[2]][[2]][[3]][[2]][[2]][[2]] [1] 10 [[2]][[3]] [1] 999 [[3]] integer(1L) && !any(is.na(w)) || NULL 10/14 parse.R: unitizer_sect("validators", { 10/14 parse.R: vetr:::parse_validator(INT.1, quote(w)) [[1]] integer(1L) && !is.na(NULL) && is.finite(NULL) [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [[2]][[2]][[1]] [1] 1 [[2]][[2]][[2]] [[2]][[2]][[2]][[1]] [1] 999 [[2]][[2]][[2]][[2]] [1] 999 [[2]][[2]][[3]] [[2]][[2]][[3]][[1]] [1] 10 [[2]][[2]][[3]][[2]] [[2]][[2]][[3]][[2]][[1]] [1] 999 [[2]][[2]][[3]][[2]][[2]] [1] 10 [[2]][[3]] [[2]][[3]][[1]] [1] 10 [[2]][[3]][[2]] [1] 10 [[3]] integer(1L) && !is.na(w) && is.finite(w) 10/14 parse.R: vetr:::parse_validator(INT, quote(w)) [[1]] integer() && !is.na(NULL) && is.finite(NULL) [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [[2]][[2]][[1]] [1] 1 [[2]][[2]][[2]] [[2]][[2]][[2]][[1]] [1] 999 [[2]][[2]][[3]] [[2]][[2]][[3]][[1]] [1] 10 [[2]][[2]][[3]][[2]] [[2]][[2]][[3]][[2]][[1]] [1] 999 [[2]][[2]][[3]][[2]][[2]] [1] 10 [[2]][[3]] [[2]][[3]][[1]] [1] 10 [[2]][[3]][[2]] [1] 10 [[3]] integer() && !is.na(w) && is.finite(w) 10/14 parse.R: vetr:::parse_validator(CHR.1, quote(w)) [[1]] character(1L) && !is.na(NULL) [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [[2]][[2]][[1]] [1] 999 [[2]][[2]][[2]] [1] 999 [[2]][[3]] [[2]][[3]][[1]] [1] 10 [[2]][[3]][[2]] [[2]][[3]][[2]][[1]] [1] 999 [[2]][[3]][[2]][[2]] [1] 10 [[3]] character(1L) && !is.na(w) 10/14 parse.R: vetr:::parse_validator(CHR, quote(w)) [[1]] character() && !is.na(NULL) [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [[2]][[2]][[1]] [1] 999 [[2]][[3]] [[2]][[3]][[1]] [1] 10 [[2]][[3]][[2]] [[2]][[3]][[2]][[1]] [1] 999 [[2]][[3]][[2]][[2]] [1] 10 [[3]] character() && !is.na(w) 10/14 parse.R: vetr:::parse_validator(NUM.1, quote(w)) [[1]] numeric(1L) && !is.na(NULL) && is.finite(NULL) [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [[2]][[2]][[1]] [1] 1 [[2]][[2]][[2]] [[2]][[2]][[2]][[1]] [1] 999 [[2]][[2]][[2]][[2]] [1] 999 [[2]][[2]][[3]] [[2]][[2]][[3]][[1]] [1] 10 [[2]][[2]][[3]][[2]] [[2]][[2]][[3]][[2]][[1]] [1] 999 [[2]][[2]][[3]][[2]][[2]] [1] 10 [[2]][[3]] [[2]][[3]][[1]] [1] 10 [[2]][[3]][[2]] [1] 10 [[3]] numeric(1L) && !is.na(w) && is.finite(w) 10/14 parse.R: vetr:::parse_validator(NUM, quote(w)) [[1]] numeric() && !is.na(NULL) && is.finite(NULL) [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [[2]][[2]][[1]] [1] 1 [[2]][[2]][[2]] [[2]][[2]][[2]][[1]] [1] 999 [[2]][[2]][[3]] [[2]][[2]][[3]][[1]] [1] 10 [[2]][[2]][[3]][[2]] [[2]][[2]][[3]][[2]][[1]] [1] 999 [[2]][[2]][[3]][[2]][[2]] [1] 10 [[2]][[3]] [[2]][[3]][[1]] [1] 10 [[2]][[3]][[2]] [1] 10 [[3]] numeric() && !is.na(w) && is.finite(w) 10/14 parse.R: vetr:::parse_validator(LGL.1, quote(w)) [[1]] logical(1L) && !is.na(NULL) [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [[2]][[2]][[1]] [1] 999 [[2]][[2]][[2]] [1] 999 [[2]][[3]] [[2]][[3]][[1]] [1] 10 [[2]][[3]][[2]] [[2]][[3]][[2]][[1]] [1] 999 [[2]][[3]][[2]][[2]] [1] 10 [[3]] logical(1L) && !is.na(w) 10/14 parse.R: vetr:::parse_validator(LGL, quote(w)) [[1]] logical() && !is.na(NULL) [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [[2]][[2]][[1]] [1] 999 [[2]][[3]] [[2]][[3]][[1]] [1] 10 [[2]][[3]][[2]] [[2]][[3]][[2]][[1]] [1] 999 [[2]][[3]][[2]][[2]] [1] 10 [[3]] logical() && !is.na(w) 10/14 parse.R: vetr:::parse_validator(CPX.1, quote(w)) [[1]] complex(1L) && !is.na(NULL) && is.finite(NULL) [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [[2]][[2]][[1]] [1] 1 [[2]][[2]][[2]] [[2]][[2]][[2]][[1]] [1] 999 [[2]][[2]][[2]][[2]] [1] 999 [[2]][[2]][[3]] [[2]][[2]][[3]][[1]] [1] 10 [[2]][[2]][[3]][[2]] [[2]][[2]][[3]][[2]][[1]] [1] 999 [[2]][[2]][[3]][[2]][[2]] [1] 10 [[2]][[3]] [[2]][[3]][[1]] [1] 10 [[2]][[3]][[2]] [1] 10 [[3]] complex(1L) && !is.na(w) && is.finite(w) 10/14 parse.R: vetr:::parse_validator(CPX, quote(w)) [[1]] complex() && !is.na(NULL) && is.finite(NULL) [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [[2]][[2]][[1]] [1] 1 [[2]][[2]][[2]] [[2]][[2]][[2]][[1]] [1] 999 [[2]][[2]][[3]] [[2]][[2]][[3]][[1]] [1] 10 [[2]][[2]][[3]][[2]] [[2]][[2]][[3]][[2]][[1]] [1] 999 [[2]][[2]][[3]][[2]][[2]] [1] 10 [[2]][[3]] [[2]][[3]][[1]] [1] 10 [[2]][[3]][[2]] [1] 10 [[3]] complex() && !is.na(w) && is.finite(w) 11/14 tev.R: 11/14 tev.R: library(vetr) 11/14 tev.R: unitizer_sect("tev", { 11/14 tev.R: tev(runif(2), numeric(2)) [1] TRUE 11/14 tev.R: tev(runif(3), numeric(2)) [1] "`length(runif(3))` should be 2 (is 3)" 12/14 type.R: 12/14 type.R: library(vetr) 12/14 type.R: unitizer_sect("type_of", { 12/14 type.R: type_of(1:100) [1] "integer" 12/14 type.R: type_of(1.1) [1] "double" 12/14 type.R: type_of(1:100 + 1) [1] "integer" 12/14 type.R: type_of(1:100 + 1/1e+09) [1] "double" 12/14 type.R: type_of(NA_real_) [1] "double" 12/14 type.R: type_of(Inf) [1] "double" 12/14 type.R: type_of(-Inf) [1] "double" 12/14 type.R: unitizer_sect("type_alike", { 12/14 type.R: type_alike(1, 1.1) [1] TRUE 12/14 type.R: type_alike(1L, 1.1) [1] "`1.1` should be type \"integer-like\" (is \"double\")" 12/14 type.R: type_alike(1L, 1.00000001) [1] "`1.00000001` should be type \"integer-like\" (is \"double\")" 12/14 type.R: type_alike(1L, 1) [1] TRUE 12/14 type.R: type_alike(1, 1.1, vetr_settings(type.mode = 1)) [1] TRUE 12/14 type.R: type_alike(1L, 1, vetr_settings(type.mode = 1)) [1] "`1` should be type \"integer\" (is \"double\")" 12/14 type.R: type_alike(1, 1L, vetr_settings(type.mode = 1)) [1] TRUE 12/14 type.R: type_alike(1, 1L, vetr_settings(type.mode = 2)) [1] "`1L` should be type \"double\" (is \"integer\")" 12/14 type.R: type_alike(1:100, 1:100 + 0) [1] TRUE 12/14 type.R: type_alike(1:101, 1:101 + 0) [1] "`1:101 + 0` should be type \"integer\" (is \"double\")" 12/14 type.R: type_alike(1:101, 1:101 + 0, vetr_settings(fuzzy.int.max.len = 200 [1] TRUE 12/14 type.R: type_alike(numeric(), c(1.1, 0.053, 41.8)) [1] TRUE 12/14 type.R: type_alike(numeric(), list(1.1)) [1] "`list(1.1)` should be type \"numeric\" (is \"list\")" 12/14 type.R: type_alike(list(), integer()) [1] "`integer()` should be type \"list\" (is \"integer\")" 12/14 type.R: type_alike(1000000L, 1000000L + 0.1) [1] "`1000000L + 0.1` should be type \"integer-like\" (is \"double\")" 12/14 type.R: type_alike(1000000L, 1000000L + 0) [1] TRUE 12/14 type.R: type_alike(data.frame(a = 1:10), list()) [1] TRUE 12/14 type.R: type_alike(NULL, NULL) [1] TRUE 12/14 type.R: type_alike(1/0, NA) [1] "`NA` should be type \"numeric\" (is \"logical\")" 12/14 type.R: type_alike(1, 1.1, vetr_settings(type.mode = 1:2)) Error in type_alike(1, 1.1, vetr_settings(type.mode = 1:2)) : Setting `type.mode` must be scalar integer (is length 2). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> type_alike 12/14 type.R: type_alike(1, 1.1, vetr_settings(fuzzy.int.max.len = 1:2)) Error in type_alike(1, 1.1, vetr_settings(fuzzy.int.max.len = 1:2)) : Setting `fuzzy.int.max.len` must be scalar integer (is length 2). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> type_alike 12/14 type.R: unitizer_sect("functions", { 12/14 type.R: type_alike(sd, var) [1] TRUE 12/14 type.R: type_alike(`&&`, sd) [1] TRUE 12/14 type.R: type_alike(`&&`, sum) [1] TRUE 12/14 type.R: type_alike(sum, sd) [1] TRUE 12/14 type.R: type_alike(sum, c) [1] TRUE 12/14 type.R: type_alike(`&&`, `[`) [1] TRUE 12/14 type.R: type_alike(sd, 1:3) [1] "`1:3` should be type \"function\" (is \"integer\")" 12/14 type.R: type_alike(sd, var, vetr_settings(type.mode = 1)) [1] TRUE 12/14 type.R: type_alike(`&&`, sd, vetr_settings(type.mode = 1)) [1] "`sd` should be type \"special\" (is \"closure\")" 12/14 type.R: type_alike(`&&`, sum, vetr_settings(type.mode = 1)) [1] "`sum` should be type \"special\" (is \"builtin\")" 12/14 type.R: type_alike(sum, sd, vetr_settings(type.mode = 1)) [1] "`sd` should be type \"builtin\" (is \"closure\")" 12/14 type.R: type_alike(sum, c, vetr_settings(type.mode = 1)) [1] TRUE 12/14 type.R: type_alike(`&&`, `[`, vetr_settings(type.mode = 1)) [1] TRUE 13/14 validate.R: 13/14 validate.R: library(vetr) 13/14 validate.R: set.seed(1) 13/14 validate.R: unitizer_sect("Tokens Pass", { 13/14 validate.R: vet(INT.1, 1) [1] TRUE 13/14 validate.R: vet(INT.1.POS, 1) [1] TRUE 13/14 validate.R: vet(INT.1.NEG, -1) [1] TRUE 13/14 validate.R: vet(INT.1.POS.STR, 1) [1] TRUE 13/14 validate.R: vet(INT.1.NEG.STR, -1) [1] TRUE 13/14 validate.R: vet(INT, -1:1) [1] TRUE 13/14 validate.R: vet(INT.POS, 0:3) [1] TRUE 13/14 validate.R: vet(INT.NEG, 0:-3) [1] TRUE 13/14 validate.R: vet(INT.POS.STR, 1:3) [1] TRUE 13/14 validate.R: vet(INT.NEG.STR, -(1:3)) [1] TRUE 13/14 validate.R: vet(NUM.1, 1.44) [1] TRUE 13/14 validate.R: vet(NUM.1.POS, 1.44) [1] TRUE 13/14 validate.R: vet(NUM.1.NEG, -1.44) [1] TRUE 13/14 validate.R: vet(NUM, runif(5)) [1] TRUE 13/14 validate.R: vet(NUM.POS, runif(5)) [1] TRUE 13/14 validate.R: vet(NUM.NEG, -runif(5)) [1] TRUE 13/14 validate.R: vet(CHR, character()) [1] TRUE 13/14 validate.R: vet(CHR.1, "hello") [1] TRUE 13/14 validate.R: vet(CHR, letters) [1] TRUE 13/14 validate.R: vet(CPX, 1:10 + (0+0.5i)) [1] TRUE 13/14 validate.R: vet(CPX.1, 1 + (0+0.5i)) [1] TRUE 13/14 validate.R: vet(LGL, c(TRUE, FALSE)) [1] TRUE 13/14 validate.R: vet(LGL.1, TRUE) [1] TRUE 13/14 validate.R: unitizer_sect("Tokens Fail", { 13/14 validate.R: vet(INT.1, 1.2) [1] "`1.2` should be type \"integer-like\" (is \"double\")" 13/14 validate.R: vet(INT.1, 1:2) [1] "`length(1:2)` should be 1 (is 2)" 13/14 validate.R: vet(INT.1, NA_integer_) [1] "`NA_integer_` should not contain NAs, but does" 13/14 validate.R: vet(INT.1, Inf) [1] "`Inf` should be type \"integer-like\" (is \"double\")" 13/14 validate.R: vet(INT.1.POS, -1) [1] "`-1` should contain only positive values, but has negatives" 13/14 validate.R: vet(INT.1.POS, 1:2) [1] "`length(1:2)` should be 1 (is 2)" 13/14 validate.R: vet(INT.1.NEG, 1) [1] "`1` should contain only negative values, but has positives" 13/14 validate.R: vet(INT.1.NEG, -(1:2)) [1] "`length(-(1:2))` should be 1 (is 2)" 13/14 validate.R: vet(INT.1.POS.STR, 0) [1] "`0` should contain only \"strictly positive\" values, but has zeroes or negatives" 13/14 validate.R: vet(INT.1.NEG.STR, 0) [1] "`0` should contain only \"strictly negative\" values, but has zeroes or positives" 13/14 validate.R: vet(INT, c(-1:1, NA_integer_)) [1] "`c(-1:1, NA_integer_)` should not contain NAs, but does" 13/14 validate.R: vet(INT, letters) [1] "`letters` should be type \"integer-like\" (is \"character\")" 13/14 validate.R: vet(INT.POS, -(1:3)) [1] "`-(1:3)` should contain only positive values, but has negatives" 13/14 validate.R: vet(INT.NEG, 1:3) [1] "`1:3` should contain only negative values, but has positives" 13/14 validate.R: vet(INT.POS.STR, 0:3) [1] "`0:3` should contain only \"strictly positive\" values, but has zeroes or negatives" 13/14 validate.R: vet(INT.NEG.STR, -(0:3)) [1] "`-(0:3)` should contain only \"strictly negative\" values, but has zeroes or positives" 13/14 validate.R: vet(NUM.1, 1.44 + 1:2) [1] "`length(1.44 + 1:2)` should be 1 (is 2)" 13/14 validate.R: vet(NUM.1.POS, -runif(1) - 1) [1] "`-runif(1) - 1` should contain only positive values, but has negatives" 13/14 validate.R: vet(NUM.1.NEG, runif(1) + 1) [1] "`runif(1) + 1` should contain only negative values, but has positives" 13/14 validate.R: vet(NUM, c(NA_real_, 1)) [1] "`c(NA_real_, 1)` should not contain NAs, but does" 13/14 validate.R: vet(NUM, NULL) [1] "`NULL` should be type \"numeric\" (is \"NULL\")" 13/14 validate.R: vet(NUM.POS, -runif(5) - 1) [1] "`-runif(5) - 1` should contain only positive values, but has negatives" 13/14 validate.R: vet(NUM.NEG, runif(5) + 1) [1] "`runif(5) + 1` should contain only negative values, but has positives" 13/14 validate.R: vet(CHR.1, letters) [1] "`length(letters)` should be 1 (is 26)" 13/14 validate.R: vet(CHR, list(1, 2, 3)) [1] "`list(1, 2, 3)` should be type \"character\" (is \"list\")" 13/14 validate.R: vet(CPX, list(1, 2, 3)) [1] "`list(1, 2, 3)` should be type \"complex\" (is \"list\")" 13/14 validate.R: vet(CPX.1, list(1, 2, 3)) [1] "`list(1, 2, 3)` should be type \"complex\" (is \"list\")" 13/14 validate.R: vet(LGL, NA) [1] "`NA` should not contain NAs, but does" 13/14 validate.R: vet(LGL, letters) [1] "`letters` should be type \"logical\" (is \"character\")" 13/14 validate.R: vet(LGL.1, 1:2 == 1:2) [1] "`length(1:2 == 1:2)` should be 1 (is 2)" 13/14 validate.R: unitizer_sect("Custom expressions", { 13/14 validate.R: vet(. > 5, 1:10) [1] "`1:10 > 5` is not all TRUE (contains non-TRUE values)" 13/14 validate.R: vet(. > 5, 6:10) [1] TRUE 13/14 validate.R: vet(.(c(TRUE, NA, TRUE)), 1:5) [1] "`c(TRUE, NA, TRUE)` is not TRUE (contains NAs)" 13/14 validate.R: vet(.(1:5), 1:5) [1] "`1:5` is not TRUE (is \"integer\" instead of a \"logical\")" 13/14 validate.R: vet(.(1:5, 1:5), 1:5) Error in vet(.(1:5, 1:5), 1:5) : `.(` must be used with only one argument. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet 13/14 validate.R: vet(.(list(1, 2, 3)), 1:3) [1] "`list(1, 2, 3)` is not TRUE (is \"list\" instead of a \"logical\")" 13/14 validate.R: vet(.(c("hello world", "goodbye moon")), 1:3) [1] "`c(\"hello world\", \"goodbye moon\")` is not TRUE (is chr [1:2]: \"hello world\" ...)" 13/14 validate.R: unitizer_sect("Compound Expressions", { 13/14 validate.R: vet(INT.1 || NULL, 1) [1] TRUE 13/14 validate.R: vet(INT.1 || NULL, NULL) [1] TRUE 13/14 validate.R: vet(INT.1 || NULL, 1.4) [1] "`1.4` should be `NULL`, or type \"integer-like\" (is \"double\")" 13/14 validate.R: vet(INT.1 || NULL || character(3L), 1) [1] TRUE 13/14 validate.R: vet(INT.1 || NULL || character(3L), 1.2) [1] "`1.2` should be `NULL`, type \"character\", or type \"integer-like\" (is \"double\")" 13/14 validate.R: vet(INT.1 || NULL || character(3L), letters) [1] "At least one of these should pass:" [2] " - `length(letters)` should be 3 (is 26)" [3] " - `letters` should be `NULL`, or type \"integer-like\" (is \"character\")" 13/14 validate.R: vet((matrix(integer(), 0) && nrow(.) == ncol(.)) || NULL, matr [1] TRUE 13/14 validate.R: vet((matrix(integer(), 0) && nrow(.) == ncol(.)) || NULL, matr [1] "At least one of these should pass:" [2] " - `matrix(1:16, nrow = 2)` should be `NULL` (is \"integer\")" [3] " - `nrow(matrix(1:16, nrow = 2)) == ncol(matrix(1:16, nrow = 2))` is not TRUE (FALSE)" 13/14 validate.R: vet((matrix(integer(), 0) && nrow(.) == ncol(.)) || NULL, matr [1] "`matrix(runif(16), nrow = 4)` should be `NULL`, or type \"integer-like\" (is \"double\")" 13/14 validate.R: exp.a <- quote(all(. > 0)) 13/14 validate.R: exp.b <- quote(is.vector(.)) 13/14 validate.R: vet(exp.a && exp.b, -(1:3)) [1] "`all(-(1:3) > 0)` is not TRUE (FALSE)" 13/14 validate.R: local({ [1] TRUE 13/14 validate.R: vet(1 || "a" || 1 || "a" || 1 || letters, 1:3) [1] "At least one of these should pass:" [2] " - `1:3` should be type \"character\" (is \"integer\")" [3] " - `length(1:3)` should be 1 (is 3)" 13/14 validate.R: unitizer_sect("Other Return Modes", { 13/14 validate.R: vet(INT.1 || NULL || LGL, "hello", format = "text") [1] "`\"hello\"` should be `NULL`, type \"integer-like\", or type \"logical\" (is \"character\")" 13/14 validate.R: vet(INT.1 || NULL || LGL, "hello", format = "raw") [1] "`\"hello\"` should be `NULL`, type \"integer-like\", or type \"logical\" (is \"character\")" 13/14 validate.R: vet(INT.1 || NULL || LGL, "hello", format = "full") [1] "For argument `current`, `\"hello\"` should be `NULL`, type \"integer-like\", or type \"logical\" (is \"character\")" 13/14 validate.R: vet(INT.1 || NULL || LGL, "hello", format = "halloween") Error in vet(INT.1 || NULL || LGL, "hello", format = "halloween") : `vet` usage error: argument `format` must be one of "text", "raw", "full" Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet 13/14 validate.R: vet(INT.1 || NULL || LGL, "hello", format = 1:10) Error in vet(INT.1 || NULL || LGL, "hello", format = 1:10) : `vet` usage error: argument `format` must be character(1L). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet 13/14 validate.R: vet(INT.1 || NULL || LGL, "hello", format = "text", stop = TRU Error in vet(INT.1 || NULL || LGL, "hello", format = "text", stop = TRUE) : `"hello"` should be `NULL`, type "integer-like", or type "logical" (is "character") Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet 13/14 validate.R: vet(INT.1 || NULL || LGL, "hello", format = "text", stop = 1:3 Error in vet(INT.1 || NULL || LGL, "hello", format = "text", stop = 1:3) : `vet` usage error: argument `stop` must be TRUE or FALSE. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet 13/14 validate.R: unitizer_sect("Multi-line Stuff", { 13/14 validate.R: vet(NO.NA, c(234234131431, 123413413413, 1341341341, 123412341 [1] "c(234234131431, 123413413413, 1341341341, 12341234134, 562456234, \n 24624624, 2452345234, 2345234524, 23452452, 2243524352, 254254234, \n 2452452435, NA)\n should not contain NAs, but does" 13/14 validate.R: vet(NO.NA || !anyNA(.), c(234234131431, 123413413413, 13413413 [1] "At least one of these should pass:" [2] " - !anyNA(c(234234131431, 123413413413, 1341341341, 12341234134, \n 562456234, 24624624, 2452345234, 2345234524, 23452452, 2243524352, \n 254254234, 2452452435, NA))\n is not TRUE (FALSE)" [3] " - c(234234131431, 123413413413, 1341341341, 12341234134, 562456234, \n 24624624, 2452345234, 2345234524, 23452452, 2243524352, 254254234, \n 2452452435, NA)\n should not contain NAs, but does" 13/14 validate.R: vet(!anyNA(.), c(234234131431, 123413413413, 1341341341, 12341 [1] "!anyNA(c(234234131431, 123413413413, 1341341341, 12341234134, \n 562456234, 24624624, 2452345234, 2345234524, 23452452, 2243524352, \n 254254234, 2452452435, NA))\nis not TRUE (FALSE)" 13/14 validate.R: vet(!anyNA(.), c(234234131431, 123413413413, NA)) [1] "`!anyNA(c(234234131431, 123413413413, NA))` is not TRUE (FALSE)" 13/14 validate.R: val.exp <- quote(!anyNA(.)) 13/14 validate.R: vet(val.exp, c(234234131431, 123413413413, NA)) [1] "`!anyNA(c(234234131431, 123413413413, NA))` is not TRUE (FALSE)" 13/14 validate.R: unitizer_sect("Embedded String Errors", { 13/14 validate.R: vet(all_bw(., 0, 1), 0:5) [1] "`all_bw(0:5, 0, 1)` is not TRUE (is chr: \"`2` at index 3 not in `[0,1]`\")" 13/14 validate.R: vet(all.equal(., 1:5), 1:6) [1] "`all.equal(1:6, 1:5)` is not TRUE (is chr: \"Numeric: lengths (6, 5) differ\")" 13/14 validate.R: unitizer_sect("Language", { 13/14 validate.R: vet(quote(quote(a + b)), quote(x2 + x3)) [1] "`quote(x2 + x3)[[1]]` should be a call to `quote` (is a call to `+`)" 13/14 validate.R: x <- quote(quote(a + b)) 13/14 validate.R: vet(x, quote(x2 + x3)) [1] TRUE 13/14 validate.R: vet(quote(a + b), quote(2 + x3)) [1] "`quote(2 + x3)[[2]]` should be \"symbol\" (is \"double\")" 13/14 validate.R: vet(quote(a + b), quote(x1 + x2 + x3)) [1] "`quote(x1 + x2 + x3)[[2]]` should be \"symbol\" (is \"language\")" 13/14 validate.R: unlist(lapply(c("aaA", "bbB", "ccC", "ddD", "eeE"), find)) character(0) 13/14 validate.R: x <- quote(aaA + bbB) 13/14 validate.R: my.env <- new.env() 13/14 validate.R: my.env$y <- quote(ccC - ddD) 13/14 validate.R: evalq(vet(quote(x * y), quote(A * (B - C))), envir = my.env) [1] "`quote(A * (B - C))[[2]]` should be a call to `+` (is \"symbol\")" 13/14 validate.R: evalq(vet(quote(eeE * y), quote(A * (B - C))), envir = my.env) [1] TRUE 13/14 validate.R: evalq(vet(quote(x * y), quote((A + D) * (B - C))), envir = my. [1] TRUE 13/14 validate.R: expA <- expB <- expC <- expD <- expE <- 0 13/14 validate.R: expA <- quote(expB && expC) 13/14 validate.R: expB <- quote(expD * expE) 13/14 validate.R: expE <- quote(expA || expD) 13/14 validate.R: vet(expA, TRUE) Error in vet(expA, TRUE) : Possible infinite recursion encountered when substituting symbol `expA`. `vetr` recursively substitutes the vetting expressions. See `vignette('vetr', package='vetr')`, "Non Standard Evaluation" section. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet 13/14 validate.R: expE <- quote(expA) 13/14 validate.R: vet(expA, TRUE) Error in vet(expA, TRUE) : Possible infinite recursion encountered when substituting symbol `expA`. `vetr` recursively substitutes the vetting expressions. See `vignette('vetr', package='vetr')`, "Non Standard Evaluation" section. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet 13/14 validate.R: . <- quote(. > 0) 13/14 validate.R: vet(.., 1.4) [1] TRUE 13/14 validate.R: . <- quote(numeric(1L)) 13/14 validate.R: vet(.., 1.5) [1] TRUE 13/14 validate.R: unitizer_sect("Errors", { 13/14 validate.R: vet(1, 1, env = "hello") Error in vet(1, 1, env = "hello") : `vet` usage error: argument `env` must be an environment (is character). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet 13/14 validate.R: unitizer_sect("Custom tokens", { 13/14 validate.R: cust.tok.1 <- vet_token(quote(TRUE), "%sshould be logical(1L)" 13/14 validate.R: vet(cust.tok.1, TRUE) [1] TRUE 13/14 validate.R: vet(cust.tok.1, 1:2) [1] "`1:2` should be type \"logical\" (is \"integer\")" 13/14 validate.R: vet_token(quote(TRUE), "should be logical(1L)") Error in vet_token(quote(TRUE), "should be logical(1L)") : Argument `err.msg` must be character(1L) and contain a single '%s' for use by `sprintf`. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet_token 13/14 validate.R: vet_token(quote(TRUE), letters) Error in vet_token(quote(TRUE), letters) : Argument `err.msg` must be character(1L) and contain a single '%s' for use by `sprintf`. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet_token 13/14 validate.R: cust.tok.2 <- quote(. > 2) 13/14 validate.R: attr(cust.tok.2, "err.msg") <- letters 13/14 validate.R: vet(cust.tok.2, TRUE) Error in vet(cust.tok.2, TRUE) : "err.msg" attribute for validation token for argument `current` must be a one length character vector. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet 13/14 validate.R: unitizer_sect("Result Buffer", { 13/14 validate.R: set1 <- vetr_settings(result.list.size.init = 1) 13/14 validate.R: vet.exp <- quote(1 || 1:2 || 1:3 || 1:4 || 1:5 || 1:6 || 1:7 | 13/14 validate.R: vet(vet.exp, 1:8, settings = set1) [1] TRUE 13/14 validate.R: vet(vet.exp, 1:9, settings = set1) [1] "`length(1:9)` should be 1, 2, 3, 4, 5, 6, 7, or 8 (is 9)" 13/14 validate.R: set2 <- vetr_settings(result.list.size.init = 1, result.list.s 13/14 validate.R: vet(vet.exp, 1:8, settings = set2) Error in vet(vet.exp, 1:8, settings = set2) : Reached maximum vet token result buffer size (7); this should only happen if you have more than that number of tokens compounded with `||`. If that is the case, see description of `result.list.size` parameter for `?vetr_settings`. If not, contact maintainer. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet 13/14 validate.R: vet(vet.exp, 1:9, settings = set2) Error in vet(vet.exp, 1:9, settings = set2) : Reached maximum vet token result buffer size (7); this should only happen if you have more than that number of tokens compounded with `||`. If that is the case, see description of `result.list.size` parameter for `?vetr_settings`. If not, contact maintainer. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet 13/14 validate.R: set3 <- vetr_settings(result.list.size.init = 1, result.list.s 13/14 validate.R: vet(vet.exp, 1:8, settings = set3) [1] TRUE 13/14 validate.R: vet(vet.exp, 1:9, settings = set3) [1] "`length(1:9)` should be 1, 2, 3, 4, 5, 6, 7, or 8 (is 9)" 13/14 validate.R: set4 <- vetr_settings(result.list.size.init = "hello", result. 13/14 validate.R: set5 <- vetr_settings(result.list.size.init = 1, result.list.s 13/14 validate.R: vet(1, 1, settings = set4) Error in vet(1, 1, settings = set4) : Setting `result.list.size.init` must be integer-like (is character). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet 13/14 validate.R: vet(1, 1, settings = set5) Error in vet(1, 1, settings = set5) : Setting `result.list.size.max` must be integer-like (is character). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet 13/14 validate.R: unitizer_sect("pkg::fun calls (issue #100)", { 13/14 validate.R: vet(base::sum(.), 1:10) [1] "{base::sum(1:10)} is not TRUE (is \"integer\" instead of a \"logical\")" 13/14 validate.R: vet((base::.)(identity), is.function) [1] TRUE 13/14 validate.R: vet((base::.)(identity), is.integer) [1] "{base::is.integer(identity)} is not TRUE (FALSE)" 13/14 validate.R: unitizer_sect("promises (issue #106)", { 13/14 validate.R: env1 <- new.env() 13/14 validate.R: delayedAssign("x", stop("error 1"), assign.env = env1) 13/14 validate.R: env2 <- new.env() 13/14 validate.R: delayedAssign("x", stop("error 2"), assign.env = env2) 13/14 validate.R: env0 <- list2env(list(x = TRUE), new.env()) 13/14 validate.R: vet(env1, env0) Error in vet(env1, env0) : error 1 Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet 13/14 validate.R: vet(env0, env2) Error in vet(env0, env2) : error 2 Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet 14/14 validate.args.R: 14/14 validate.args.R: library(vetr) 14/14 validate.args.R: unitizer_sect("Single template validation", { 14/14 validate.args.R: fun0 <- function(x, y, z) vetr(x = matrix(integer(), ncol 14/14 validate.args.R: fun0(1, 2, 3) Error in fun0(x = 1, y = 2, z = 3) : For argument `x`, `1` should be "matrix" (is "numeric") Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun0 -> vetr 14/14 validate.args.R: fun0(matrix(1), 2, 3) Error in fun0(x = matrix(1), y = 2, z = 3) : For argument `x`, `matrix(1)` should have 3 columns (has 1) Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun0 -> vetr 14/14 validate.args.R: fun0(matrix(1:3, nrow = 1), 2, 3) Error in fun0(x = matrix(1:3, nrow = 1), y = 2, z = 3) : For argument `y`, `length(2)` should be 2 (is 1) Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun0 -> vetr 14/14 validate.args.R: fun0(matrix(1:3, nrow = 1), 2:3, 3) Error in fun0(x = matrix(1:3, nrow = 1), y = 2:3, z = 3) : For argument `z`, `3` should be type "logical" (is "double") Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun0 -> vetr 14/14 validate.args.R: fun0(matrix(1:3, nrow = 1), c(2, 3), 3) Error in fun0(x = matrix(1:3, nrow = 1), y = c(2, 3), z = 3) : For argument `z`, `3` should be type "logical" (is "double") Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun0 -> vetr 14/14 validate.args.R: fun0(matrix(1:3, nrow = 1), c(2, 3), TRUE) [1] TRUE 14/14 validate.args.R: unitizer_sect("Multi-template validation", { 14/14 validate.args.R: fun1 <- function(x, y, z) vetr(x = matrix(integer(), ncol 14/14 validate.args.R: fun1(1:3, "fail", "fail") Error in fun1(x = 1:3, y = "fail", z = "fail") : For argument `y`, `"fail"` should be `NULL`, type "integer-like", or type "logical" (is "character") Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun1 -> vetr 14/14 validate.args.R: fun1(matrix(1:9, ncol = 3), "fail", "fail") Error in fun1(x = matrix(1:9, ncol = 3), y = "fail", z = "fail") : For argument `y`, `"fail"` should be `NULL`, type "integer-like", or type "logical" (is "character") Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun1 -> vetr 14/14 validate.args.R: fun1(letters[1:3], "fail", "fail") Error in fun1(x = letters[1:3], y = "fail", z = "fail") : For argument `x`, `letters[1:3]` should be "matrix", or type "integer-like" (is "character") Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun1 -> vetr 14/14 validate.args.R: fun1(1:3, 1:2, "fail") Error in fun1(x = 1:3, y = 1:2, z = "fail") : For argument `z`, `"fail"` should be type "logical" (is "character") Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun1 -> vetr 14/14 validate.args.R: fun1(1:3, NULL, "fail") Error in fun1(x = 1:3, y = NULL, z = "fail") : For argument `z`, `"fail"` should be type "logical" (is "character") Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun1 -> vetr 14/14 validate.args.R: fun1(1:3, FALSE, "fail") Error in fun1(x = 1:3, y = FALSE, z = "fail") : For argument `z`, `"fail"` should be type "logical" (is "character") Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun1 -> vetr 14/14 validate.args.R: fun1(1:3, FALSE, FALSE) [1] TRUE 14/14 validate.args.R: unitizer_sect("Template and Straight Eval", { 14/14 validate.args.R: fun2 <- function(x, y, z) vetr(x = (matrix(integer(), nco 14/14 validate.args.R: fun2(matrix(c(1:8, NA), nrow = 3), NULL, NULL) Error in fun2(x = matrix(c(1:8, NA), nrow = 3), y = NULL, z = NULL) : For argument `x`, `!any(is.na(matrix(c(1:8, NA), nrow = 3)))` is not TRUE (FALSE) Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun2 -> vetr 14/14 validate.args.R: fun2(matrix(c(1:9), nrow = 3), -1:1, NULL) Error in fun2(x = matrix(c(1:9), nrow = 3), y = -1:1, z = NULL) : For argument `y`, `all(-1:1 > 0)` is not TRUE (FALSE) Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun2 -> vetr 14/14 validate.args.R: fun2(matrix(c(1:9), nrow = 3), 1:3, NA) Error in fun2(x = matrix(c(1:9), nrow = 3), y = 1:3, z = NA) : For argument `z`, `!is.na(NA)` is not TRUE (FALSE) Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun2 -> vetr 14/14 validate.args.R: fun2(matrix(c(1:9), nrow = 3), 1:3, TRUE) [1] TRUE 14/14 validate.args.R: unitizer_sect("Complex OR outcomes", { 14/14 validate.args.R: fun2a <- function(x) vetr(x = setNames(character(3L), let 14/14 validate.args.R: fun2a(letters[1:3]) Error in fun2a(x = letters[1:3]) : For argument `x` at least one of these should pass: - `letters[1:3]` should be "matrix", or type "list" (is "character") - `letters[1:3]` should have attribute "names" Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun2a -> vetr 14/14 validate.args.R: unitizer_sect("Errors in Arguments", { 14/14 validate.args.R: fun3 <- function(x, y) vetr(x = logical(1L), y = integer( 14/14 validate.args.R: fun3(stop("boom")) Error: boom Error in fun3(x = stop("boom")) : Argument `x` produced error during evaluation; see previous error. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun3 -> vetr 14/14 validate.args.R: fun3(TRUE, stop("boomBOOM")) Error: boomBOOM Error in fun3(x = TRUE, y = stop("boomBOOM")) : Argument `y` produced error during evaluation; see previous error. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun3 -> vetr 14/14 validate.args.R: fun3(1:3, stop("boomBOOM")) Error in fun3(x = 1:3, y = stop("boomBOOM")) : For argument `x`, `1:3` should be type "logical" (is "integer") Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun3 -> vetr 14/14 validate.args.R: fun4 <- function(x, y) vetr(x = stop("BOOM"), y = integer 14/14 validate.args.R: fun4(NULL, 1:3) Error: BOOM Error in vetr(x = stop("BOOM"), y = integer(3L)) : Validation expression for argument `x` produced an error (see previous error). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun4 -> vetr 14/14 validate.args.R: fun5 <- function(x, y) vetr(x = integer(3L), y = NULL || 14/14 validate.args.R: fun5(1:3, NULL) [1] TRUE 14/14 validate.args.R: fun5(1:2, NULL) Error in fun5(x = 1:2, y = NULL) : For argument `x`, `length(1:2)` should be 3 (is 2) Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun5 -> vetr 14/14 validate.args.R: fun6 <- function(x, y) vetr(x = integer(3L), y = NULL && 14/14 validate.args.R: fun6(1:3, NULL) Error: hah Error in vetr(x = integer(3L), y = NULL && .(stop("hah"))) : Validation expression for argument `y` produced an error (see previous error). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun6 -> vetr 14/14 validate.args.R: unitizer_sect("Args evaled in correct env?", { 14/14 validate.args.R: fun7 <- function(x, y = z + 2) { 14/14 validate.args.R: fun7a <- function(x, y = z + 2) { 14/14 validate.args.R: z <- 1 14/14 validate.args.R: fun7(TRUE) Error in z + 2 : non-numeric argument to binary operator Error in fun7(x = TRUE) : Argument `y` produced error during evaluation; see previous error. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun7 -> vetr 14/14 validate.args.R: fun7a(TRUE) [1] TRUE 14/14 validate.args.R: fun8 <- function(x, y = z + 2) { 14/14 validate.args.R: fun8a <- function(x, y = z + 2) { 14/14 validate.args.R: a <- NULL 14/14 validate.args.R: b <- TRUE 14/14 validate.args.R: fun8(a && b) Error in a && b : invalid 'x' type in 'x && y' Error in fun8(x = a && b) : Argument `x` produced error during evaluation; see previous error. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun8 -> vetr 14/14 validate.args.R: a <- TRUE 14/14 validate.args.R: fun8a(a && b) [1] TRUE 14/14 validate.args.R: fun_make <- function() { 14/14 validate.args.R: fun <- fun_make() 14/14 validate.args.R: a <- b <- 1:9 14/14 validate.args.R: local({ Error in fun(x = a) : For argument `x`, `a` should be "matrix" (is "character") Calls: local ... eval.parent -> eval -> eval -> eval -> eval -> fun -> vetr 14/14 validate.args.R: local({ Error in fun(x = b) : For argument `x`, `b` should be "matrix" (is "character") Calls: local ... eval.parent -> eval -> eval -> eval -> eval -> fun -> vetr 14/14 validate.args.R: fun8b <- function(x) vetr(x = length(.) > 0 && integer()) 14/14 validate.args.R: get("zfqwefkj") Error in get("zfqwefkj") : object 'zfqwefkj' not found Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> get 14/14 validate.args.R: local({ [1] TRUE 14/14 validate.args.R: unitizer_sect("Compound Expression Scope Issues", { 14/14 validate.args.R: a <- quote(!anyNA(.)) 14/14 validate.args.R: fun <- function(x) { 14/14 validate.args.R: fun(-(1:3)) Error in fun(x = -(1:3)) : For argument `x`, `all(-(1:3) > 0)` is not TRUE (FALSE) Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun -> vetr 14/14 validate.args.R: unitizer_sect("Non-equal args and validation exps", { 14/14 validate.args.R: fun8 <- function(x = "hello", y = TRUE, z) vetr(x = integ 14/14 validate.args.R: fun8(1L, NULL, 1:2) [1] TRUE 14/14 validate.args.R: fun8(1L, 1:2, NULL) Error in fun8(x = 1L, y = 1:2, z = NULL) : For argument `z`, `NULL` should be type "integer-like" (is "NULL") Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun8 -> vetr 14/14 validate.args.R: fun8(1L, 1:2) Error in fun8(x = 1L, y = 1:2) : argument `z` is missing, with no default Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun8 -> vetr 14/14 validate.args.R: fun8(1L) Error in fun8(x = 1L) : argument `z` is missing, with no default Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun8 -> vetr 14/14 validate.args.R: fun8(z = 1:2) Error in fun8(z = 1:2) : For argument `x`, `"hello"` should be type "integer-like" (is "character") Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun8 -> vetr 14/14 validate.args.R: unitizer_sect("Referencing argument in vet exp error", { 14/14 validate.args.R: fun1 <- function(x, y) vetr(x > 0, . < 3) 14/14 validate.args.R: fun1(1:10, 1:10) Error in vetr(x > 0, . < 3) : vet/vetr usage error: found symbol `x` in vetting token for object with the same symbol. Please use `.` to reference the object being checked by the vetting token (e.g. use `vet(. > 0, x)` instead of `vet(x > 0, x)`) Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun1 -> vetr 14/14 validate.args.R: fun2 <- function(x, y) vetr(. > 0 && all(y > 0), y < 3) 14/14 validate.args.R: fun2(TRUE, 1:10) Error in vetr(. > 0 && all(y > 0), y < 3) : vet/vetr usage error: found symbol `y` in vetting token for object with the same symbol. Please use `.` to reference the object being checked by the vetting token (e.g. use `vet(. > 0, x)` instead of `vet(x > 0, x)`) Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun2 -> vetr 14/14 validate.args.R: x <- 1:10 14/14 validate.args.R: vet(x > 0, x) Error in vet(x > 0, x) : vet/vetr usage error: found symbol `x` in vetting token for object with the same symbol. Please use `.` to reference the object being checked by the vetting token (e.g. use `vet(. > 0, x)` instead of `vet(x > 0, x)`) Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet 14/14 validate.args.R: vet((x + 1) > 0, x + 1) [1] "`x + 1` should be type \"logical\" (is \"double\")" 14/14 validate.args.R: unitizer_sect("Default arg mix-up", { 14/14 validate.args.R: fun10a <- function(x, y = TRUE, z = 999) vetr(INT, LGL.1, 14/14 validate.args.R: fun10a(1, z = 1:3) Error in fun10a(x = 1, z = 1:3) : For argument `z`, `length(1:3)` should be 1 (is 3) Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun10a -> vetr 14/14 validate.args.R: fun10b <- function(x, y = TRUE, z = 999) vetr(INT, z = IN 14/14 validate.args.R: fun10b(1, z = 1:3) Error in fun10b(x = 1, z = 1:3) : For argument `z`, `length(1:3)` should be 1 (is 3) Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun10b -> vetr 14/14 validate.args.R: unitizer_sect("Dots", { 14/14 validate.args.R: f <- function(x, y = 1L, z = 1L, ...) vetr(1L, 1L, 1L) 14/14 validate.args.R: f(2L, w = 3L) [1] TRUE 14/14 validate.args.R: f <- function(x, y = 1L, ...) vetr(1L, 1L, 1L) 14/14 validate.args.R: f(2L, z = 3L) Warning in vetr(1L, 1L, 1L) : `...` vetting is not supported. [1] TRUE 14/14 validate.args.R: unitizer_sect("Don't access promises in environments", { 14/14 validate.args.R: fenv <- function(env) vetr(environment()) 14/14 validate.args.R: env <- FALSE 14/14 validate.args.R: fenv(environment()) Error in fenv(env = environment()) : For argument `env`, `environment()$env` should be type "environment" (is "logical") Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fenv -> vetr 14/14 validate.args.R: unitizer_sect("Invocation via `do.call` (#109)", { 14/14 validate.args.R: f <- function(x) vetr(is.function(.)) 14/14 validate.args.R: do.call(f, list(mean)) [1] TRUE Prepping Unitizers... Warning in history_capt(history, interactive.mode) : Unable to capture history in non-interactive mode. | Summary of files in common directory 'unitizer': | | Pass Fail | 1. abstract.R 35 - | *2. alike.R 196 2 | 3. all-bw.R 207 - | 4. classes.R 22 - | 5. cstringr.R 82 - | 6. eval.R 30 - | *7. internal.R 185 2 | 8. language.R 55 - | 9. misc.R 17 - | 10. parse.R 49 - | 11. tev.R 2 - | 12. type.R 41 - | 13. validate.R 117 - | 14. validate.args.R 49 - | ............................... | 1087 4 | Legend: | * `unitizer` requires review +------------------------------------------------------------------------------+ | unitizer for: unitizer/alike.R | +------------------------------------------------------------------------------+ Pass Fail Atomic 13 - lists 12 - NULL values as wildcards 5 - Matrix / Arrays 11 - Data Frames 15 - Time Series 6 - Factors 5 - Environments / Pairlists 17 - Calls / Formulas 37 - Functions 6 1 settings 17 1 Examples 30 - Raw 1 - Errors 8 - Attributes 13 - .................................... 196 2 = Functions ==================================================================== - Failed ----------------------------------------------------------------------- | The following test failed because the new evaluation does not match the | reference value from the store. Overwrite with new result ([Y]es, [N]o, | [P]rev, [B]rowse, [R]erun, [QQ]uit All, [Q]uit, [H]elp)? # TRUE > alike(`&&`, function() NULL) | Value mismatch: < .ref > .new @@ 1 @@ @@ 1 @@ < [1] TRUE > NULL | Conditions mismatch: < .REF$conditions > .NEW$conditions @@ 1 / 1,3 @@ < Empty condition list > Condition list with 1 condition: > 1. Error in alike(`&&`, function() NULL) : argument of type NILSXP is not a > closure | State mismatch; see `.DIFF$state` for details. = settings ===================================================================== - Failed ----------------------------------------------------------------------- | The following test failed because the new evaluation does not match the | reference value from the store. Overwrite with new result ([Y]es, [N]o, | [P]rev, [B]rowse, [R]erun, [QQ]uit All, [Q]uit, [H]elp)? # FALSE > alike(`&&`, function() NULL, settings = vetr_settings(type.mode = 1)) | Value mismatch: < .ref > .new @@ 1 @@ @@ 1 @@ < [1] "`function() NULL` should be type > NULL : \"special\" (is \"closure\")" ~ | Conditions mismatch: < .REF$conditions > .NEW$conditions @@ 1 / 1,3 @@ < Empty condition list > Condition list with 1 condition: > 1. Error in alike(`&&`, function() NULL, settings = vetr_settings(type.mode = > 1)) : argument of type NILSXP is not a closure | State mismatch; see `.DIFF$state` for details. | User input required to proceed, but we are in non-interactive mode. | unitizer unchanged. +------------------------------------------------------------------------------+ | unitizer for: unitizer/internal.R | +------------------------------------------------------------------------------+ Pass Fail Name like attributes 6 - S3 Classes 12 - Dimnames 25 - Dims 18 - Time Series 9 - All Attributes, default 20 - All attributes, strict 13 - Closures 23 2 Env Track 4 - valid names 10 - Is dfish 3 - syntactic 9 - Pad or Quote 4 - Merge messages 10 - Hash 10 - Mode 6 - Find funs 3 - ................................... 185 2 = Closures ===================================================================== - Failed ----------------------------------------------------------------------- | The 2 tests in this section failed because the new evaluations do not match | the reference values from the store. Overwrite with new results ([Y]es, [N]o, | [P]rev, [B]rowse, [R]erun, [QQ]uit All, [Q]uit, [H]elp)? # FALSE, argless specials > vetr:::fun_alike(`[`, substitute) | Value mismatch: < .ref > .new @@ 1,2 @@ @@ 1 @@ < [1] "not have" "any arguments" > NULL < [3] "" "" ~ | Conditions mismatch: < .REF$conditions > .NEW$conditions @@ 1 / 1,3 @@ < Empty condition list > Condition list with 1 condition: > 1. Error in vetr:::fun_alike(`[`, substitute) : argument of type NILSXP is not > a closure | State mismatch; see `.DIFF$state` for details. # TRUE, argless specials > vetr:::fun_alike(`[`, `&&`) | Value mismatch: < .ref > .new @@ 1 @@ @@ 1 @@ < [1] TRUE > NULL | Conditions mismatch: < .REF$conditions > .NEW$conditions @@ 1 / 1,3 @@ < Empty condition list > Condition list with 1 condition: > 1. Error in vetr:::fun_alike(`[`, `&&`) : argument of type NILSXP is not a > closure | State mismatch; see `.DIFF$state` for details. | User input required to proceed, but we are in non-interactive mode. | unitizer unchanged. | * Fail: alike(`&&`, function() NULL) | * Fail: alike(`&&`, function() NULL, settings = vetr_settings(type.mode = | 1)) | in 'unitizer/alike.R' | * Fail: vetr:::fun_alike(`[`, substitute) | * Fail: vetr:::fun_alike(`[`, `&&`) | in 'unitizer/internal.R' | Newly evaluated tests do not match unitizer (Pass: 1087, Fail: 4); see above | for more info, or run in interactive mode. | Running in transcript mode: only stderr text that is also part of a signalled | condition is in the test review section (scroll up to the evaluation section | for the rest). See `transcript` parameter in `?unitize`. Error in unitize_core(test.files = test.files, store.ids = store.ids, : Cannot proceed in non-interactive mode. Calls: local ... eval -> eval -> eval -> unitize_dir -> unitize_core Execution halted Flavor: r-devel-linux-x86_64-debian-gcc

Version: 0.2.16
Check: tests
Result: ERROR Running ‘run.R’ [49s/151s] Running the tests in ‘tests/run.R’ failed. Complete output: > cat(getwd(), "\n") /data/gannet/ripley/R/packages/tests-clang/vetr.Rcheck/tests > if(suppressWarnings(require('unitizer'))) { + local({ + suppressWarnings(RNGversion("3.5.2")); + on.exit({ + RNGversion(as.character(getRversion())) + }) + pattern <- 'alike' + unitize_dir( + 'unitizer', + # pattern=pattern, + state='recommended' + ) + }) + } else { + warning("Cannot run tests without package `unitizer`") + } Loading required package: unitizer State tracking is disabled by default to comply with CRAN policies. Add `options(unitizer.state='suggested')` to your 'Rprofile' file to enable, or `options(unitizer.state='off')` to quash this message without enabling. Prior to enabling, be sure to read `?unitizerState`,in particular the 'CRAN non-compliance' section. Preloads... Loading unitizer data... Parsing tests... Parsing unitizer/abstract.R Parsing unitizer/alike.R Parsing unitizer/all-bw.R Parsing unitizer/classes.R Parsing unitizer/cstringr.R Parsing unitizer/eval.R Parsing unitizer/internal.R Parsing unitizer/language.R Parsing unitizer/misc.R Parsing unitizer/parse.R Parsing unitizer/tev.R Parsing unitizer/type.R Parsing unitizer/validate.R Parsing unitizer/validate.args.R Evaluating tests... 1/14 abstract.R: 1/14 abstract.R: library(vetr) 1/14 abstract.R: unitizer_sect("Standard Methods", { 1/14 abstract.R: abstract(1:10) integer(0) 1/14 abstract.R: abstract(list(a = 1:10, b = runif(10))) $a integer(0) $b numeric(0) 1/14 abstract.R: abstract(matrix(1:9, nrow = 3)) <0 x 0 matrix> 1/14 abstract.R: abstract(array(1:8, c(2, 2, 2), dimnames = list(letters[1:2], <0 x 0 x 0 array of integer> 1/14 abstract.R: list.arr <- replicate(8, list(1), simplify = FALSE) 1/14 abstract.R: dim(list.arr) <- rep(2, 3) 1/14 abstract.R: abstract(list.arr) <0 x 0 x 0 array of character> 1/14 abstract.R: abstract(list(1, NULL)) [[1]] numeric(0) [[2]] NULL 1/14 abstract.R: alike(abstract(iris), iris[1:10, ]) [1] TRUE 1/14 abstract.R: alike(abstract(iris), iris[1:10, 1:3]) [1] "`iris[1:10, 1:3]` should have 5 columns (has 3)" 1/14 abstract.R: alike(abstract(iris), transform(iris, Species = as.character(S [1] "`transform(iris, Species = as.character(Species))$Species` should be class \"factor\" (is \"character\")" 1/14 abstract.R: my.env <- new.env() 1/14 abstract.R: identical(my.env, abstract(my.env)) [1] TRUE 1/14 abstract.R: unitizer_sect("Time Series", { 1/14 abstract.R: y <- ts(runif(12), start = 1970, frequency = 12) 1/14 abstract.R: attr(abstract(y), "tsp") [1] 0 0 0 1/14 abstract.R: attr(abstract(y, "start"), "tsp") [1] 0.000 1970.917 12.000 1/14 abstract.R: attr(abstract(y, "end"), "tsp") [1] 1970 0 12 1/14 abstract.R: attr(abstract(y, "frequency"), "tsp") [1] 1970.000 1970.917 0.000 1/14 abstract.R: attr(abstract(y, c("start", "frequency")), "tsp") [1] 0.000 1970.917 0.000 1/14 abstract.R: abstract(y, "boom") Error in abstract.ts(y, "boom") : Argument `what` must be character with all values in c("start", "end", "frequency") Calls: local ... eval -> eval -> withVisible -> abstract -> abstract.ts 1/14 abstract.R: vetr:::abstract.ts(1:12) Error in vetr:::abstract.ts(1:12) : Argument `x` must have a "tsp" attribute that is numeric(3L) Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 1/14 abstract.R: unitizer_sect("s4", { 1/14 abstract.R: obj <- new("unitizerGlobalState") 1/14 abstract.R: abstract(obj) An object of class "unitizerGlobalState" Slot "search.path": NULL Slot "options": NULL Slot "working.directory": NULL Slot "random.seed": NULL Slot "namespaces": NULL 1/14 abstract.R: nullify(obj, 1) Error in as.list.default(obj) : no method for coercing this S4 class to a vector Error in nullify.default(obj, 1) : Could not coerce `obj` to list; see previous error. Calls: local ... eval -> eval -> withVisible -> nullify -> nullify.default 1/14 abstract.R: unitizer_sect("lm", { 1/14 abstract.R: set.seed(1) 1/14 abstract.R: df1 <- data.frame(x = runif(10), y = runif(10), z = runif(10)) 1/14 abstract.R: df2 <- data.frame(a = runif(5), b = runif(5), c = runif(5)) 1/14 abstract.R: mdl <- lm(y ~ x + poly(z, 2), df1) 1/14 abstract.R: alike(abstract(mdl), mdl) [1] TRUE 1/14 abstract.R: mdl2 <- lm(x ~ y + poly(z, 2), df1) 1/14 abstract.R: alike(abstract(mdl), mdl2) [1] TRUE 1/14 abstract.R: mdl3 <- lm(a ~ b + log(c), df2) 1/14 abstract.R: alike(abstract(mdl), mdl3) [1] "`mdl3$terms[[3]][[3]][[1]]` should be a call to `poly` (is a call to `log`)" 1/14 abstract.R: mdl4 <- lm(a ~ b, df2) 1/14 abstract.R: alike(abstract(mdl), mdl4) [1] "`mdl4$terms[[3]]` should be a call to `+` (is \"symbol\")" 1/14 abstract.R: unitizer_sect("nullify", { 1/14 abstract.R: nullify(list(1, 2, 3), 2) [[1]] [1] 1 [[2]] NULL [[3]] [1] 3 1/14 abstract.R: nullify(list(1, 2, 3), -2) Error in nullify.default(list(1, 2, 3), -2) : Argument `index` must be a valid subsetting index and if numeric must be greater than or equal to one. Calls: local ... eval -> eval -> withVisible -> nullify -> nullify.default 1/14 abstract.R: nullify(list(1, 2, 3, 4), c(TRUE, FALSE)) [[1]] NULL [[2]] [1] 2 [[3]] NULL [[4]] [1] 4 1/14 abstract.R: nullify(list(1, 2, 3, 4), c(TRUE, FALSE, FALSE)) Warning in nullify.default(list(1, 2, 3, 4), c(TRUE, FALSE, FALSE)) : Argument `obj` is not a multiple in length of argument `obj` [[1]] NULL [[2]] [1] 2 [[3]] [1] 3 [[4]] NULL 1/14 abstract.R: nullify(list(1, 2, 3, 4), c(rep(FALSE, 4), TRUE)) Error in nullify.default(list(1, 2, 3, 4), c(rep(FALSE, 4), TRUE)) : Argument `index` may be no longer than `obj` if it is logical. Calls: local ... eval -> eval -> withVisible -> nullify -> nullify.default 1/14 abstract.R: nullify(list(a = 1, b = 2, 3, 4), c("a", "b")) $a NULL $b NULL [[3]] [1] 3 [[4]] [1] 4 1/14 abstract.R: nullify(list(1, 2, 3, 4), "hello") Error in nullify.default(list(1, 2, 3, 4), "hello") : Argument `index` contains values not present in names of `obj` (hello). Calls: local ... eval -> eval -> withVisible -> nullify -> nullify.default 1/14 abstract.R: nullify(list(1, 2, 3), 4) Error in nullify.default(list(1, 2, 3), 4) : Argument `index` can only contain values that exist within seq_along(`obj`). Calls: local ... eval -> eval -> withVisible -> nullify -> nullify.default 1/14 abstract.R: iris.null <- nullify(iris[1:10, ], 4) 1/14 abstract.R: as.list(iris.null) $Sepal.Length [1] 5.1 4.9 4.7 4.6 5.0 5.4 4.6 5.0 4.4 4.9 $Sepal.Width [1] 3.5 3.0 3.2 3.1 3.6 3.9 3.4 3.4 2.9 3.1 $Petal.Length [1] 1.4 1.4 1.3 1.5 1.4 1.7 1.4 1.5 1.4 1.5 $Petal.Width NULL $Species [1] setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa Levels: setosa versicolor virginica 1/14 abstract.R: class(iris.null) [1] "data.frame" 1/14 abstract.R: nullify(letters, 5) [1] "a" "b" "c" "d" "NULL" "f" "g" "h" "i" "j" [11] "k" "l" "m" "n" "o" "p" "q" "r" "s" "t" [21] "u" "v" "w" "x" "y" "z" 1/14 abstract.R: nullify(structure(letters[1:2], class = "xqwer892jahaksdf"), Warning in nullify.default(structure(letters[1:2], class = "xqwer892jahaksdf"), : Unable to convert object back to class "xqwer892jahaksdf" [[1]] [1] "a" [[2]] NULL 2/14 alike.R: 2/14 alike.R: library(vetr) 2/14 alike.R: unitizer_sect("Atomic", { 2/14 alike.R: alike(integer(), 1:3) [1] TRUE 2/14 alike.R: alike(integer(5L), 1:3) [1] "`length(1:3)` should be 5 (is 3)" 2/14 alike.R: alike(integer(3L), 1:3) [1] TRUE 2/14 alike.R: alike(numeric(), c(1, 2, 3)) [1] TRUE 2/14 alike.R: alike(numeric(), 1L) [1] TRUE 2/14 alike.R: alike(numeric(), c(1.1, 0.053, 41.8)) [1] TRUE 2/14 alike.R: alike(integer(3L), 1:3 + 0.01) [1] "`1:3 + 0.01` should be type \"integer-like\" (is \"double\")" 2/14 alike.R: alike(integer(6L), seq(1/6, 1, 1/6) * 6) [1] "`seq(1/6, 1, 1/6) * 6` should be type \"integer-like\" (is \"double\")" 2/14 alike.R: alike(integer(4L), letters[1:4]) [1] "`letters[1:4]` should be type \"integer-like\" (is \"character\")" 2/14 alike.R: alike(letters[1:4], c("hello", "goodbye", "ba", "da")) [1] TRUE 2/14 alike.R: alike(integer(), NULL) [1] "`NULL` should be type \"integer-like\" (is \"NULL\")" 2/14 alike.R: alike(c(a = 1, b = 2), 3) [1] "`length(3)` should be 2 (is 1)" 2/14 alike.R: alike(c(a = 1, b = 2), c(1, 2)) [1] "`c(1, 2)` should have attribute \"names\"" 2/14 alike.R: unitizer_sect("lists", { 2/14 alike.R: lst <- list(list(1, 2), list(3, list(4, list(5, list(6, 6.1, 2/14 alike.R: lst.2 <- list(list(11, 21), list(31, list(41, list(51, list(61))) 2/14 alike.R: alike(lst, lst.2) [1] "`length(lst.2[[2]][[2]][[2]][[2]])` should be 3 (is 1)" 2/14 alike.R: lst.3 <- lst.2 2/14 alike.R: lst.3[[2]][[2]][[2]][[2]] <- matrix(1:9, nrow = 3) 2/14 alike.R: alike(lst, lst.3) [1] "`lst.3[[2]][[2]][[2]][[2]]` should be type \"list\" (is \"integer\")" 2/14 alike.R: alike(1:10, "hello") [1] "`\"hello\"` should be type \"integer-like\" (is \"character\")" 2/14 alike.R: alike(lst, lst) [1] TRUE 2/14 alike.R: lst.4 <- lst 2/14 alike.R: lst.4[[2]][[2]] <- list() 2/14 alike.R: alike(lst.4, lst) [1] TRUE 2/14 alike.R: alike(lst, lst.4) [1] "`length(lst.4[[2]][[2]])` should be 2 (is 0)" 2/14 alike.R: lst.5 <- list(1, list(a = 1, b = 2, c = list(d = 1))) 2/14 alike.R: lst.6 <- list(1, list(a = 1, b = 2, c = list(d = "hello"))) 2/14 alike.R: lst.5.1 <- list(1, list(a = 1, b = 2, `c d` = list(d = 1))) 2/14 alike.R: lst.6.1 <- list(1, list(a = 1, b = 2, `c d` = list(d = "hello"))) 2/14 alike.R: alike(lst.5, lst.6) [1] "`lst.6[[2]]$c$d` should be type \"numeric\" (is \"character\")" 2/14 alike.R: alike(lst.6, lst.5) [1] "`lst.5[[2]]$c$d` should be type \"character\" (is \"double\")" 2/14 alike.R: alike(lst.5.1, lst.6.1) [1] "{lst.6.1[[2]]$`c d`$d} should be type \"numeric\" (is \"character\")" 2/14 alike.R: alike(lst.6.1, lst.5.1) [1] "{lst.5.1[[2]]$`c d`$d} should be type \"character\" (is \"double\")" 2/14 alike.R: alike(pairlist(a = 1, b = "character"), pairlist(a = 1, b = lette [1] "`length(pairlist(a = 1, b = letters)$b)` should be 1 (is 26)" 2/14 alike.R: alike(pairlist(1, "character"), pairlist(1, letters)) [1] "`length(pairlist(1, letters)[[2]])` should be 1 (is 26)" 2/14 alike.R: unitizer_sect("NULL values as wildcards", { 2/14 alike.R: alike(NULL, 1:3) [1] "`1:3` should be `NULL` (is \"integer\")" 2/14 alike.R: alike(list(NULL), list(1:3)) [1] TRUE 2/14 alike.R: alike(list(NULL, NULL), list(list(list(1, 2, 3)), 1:25)) [1] TRUE 2/14 alike.R: alike(list(NULL), list(1, 2)) [1] "`length(list(1, 2))` should be 1 (is 2)" 2/14 alike.R: alike(list(), list(1, 2)) [1] TRUE 2/14 alike.R: unitizer_sect("Matrix / Arrays", { 2/14 alike.R: alike(matrix(integer(), ncol = 7), matrix(1:21, nrow = 3)) [1] TRUE 2/14 alike.R: alike(matrix(integer(), nrow = 3), matrix(1:21, nrow = 3)) [1] TRUE 2/14 alike.R: alike(matrix(character(), nrow = 3), matrix(1:21, nrow = 3)) [1] "`matrix(1:21, nrow = 3)` should be type \"character\" (is \"integer\")" 2/14 alike.R: alike(matrix(integer(), nrow = 4), matrix(1:21, nrow = 3)) [1] "`matrix(1:21, nrow = 3)` should have 4 rows (has 3)" 2/14 alike.R: alike(matrix(integer(), ncol = 3, dimnames = list(NULL, c("R", [1] TRUE 2/14 alike.R: alike(matrix(integer(), nrow = 3, dimnames = list(c("R", "G", [1] "`matrix(1:21, ncol = 3, dimnames = list(NULL, c(\"R\", \"G\", \"B\")))` should have 3 rows (has 7)" 2/14 alike.R: alike(matrix(integer(), nrow = 3, dimnames = list(c("R", "G", [1] "row.names(matrix(1:9, nrow = 3, dimnames = list(NULL, c(\"R\", \n \"G\", \"B\"))))\nshould be type \"character\" (is \"NULL\")" 2/14 alike.R: alike(matrix(integer(), nrow = 3, dimnames = list(c("R", "G", [1] TRUE 2/14 alike.R: alike(matrix(1:9, nrow = 3), 1:9) [1] "`1:9` should be \"matrix\" (is \"integer\")" 2/14 alike.R: mx.tpl <- matrix(integer(), ncol = 3, dimnames = list(row.id = NU 2/14 alike.R: mx.cur <- matrix(sample(0:255, 12), ncol = 3, dimnames = list(row 2/14 alike.R: mx.cur2 <- matrix(sample(0:255, 12), ncol = 3, dimnames = list(1: 2/14 alike.R: alike(mx.tpl, mx.cur) [1] TRUE 2/14 alike.R: alike(mx.tpl, mx.cur2) [1] "`dimnames(mx.cur2)` should have attribute \"names\"" 2/14 alike.R: unitizer_sect("Data Frames", { 2/14 alike.R: alike(mtcars, 1:3) [1] "`1:3` should be class \"data.frame\" (is \"integer\")" 2/14 alike.R: alike(1:3, mtcars) [1] "`mtcars` should be type \"integer-like\" (is \"list\")" 2/14 alike.R: alike(data.frame(), data.frame(a = 1:3, b = letters[1:3])) [1] TRUE 2/14 alike.R: (alike)(data.frame(a = integer(), b = factor()), data.frame(a = 1 [1] TRUE 2/14 alike.R: alike(data.frame(a = factor(), b = factor()), data.frame(a = 1:3, [1] "`data.frame(a = 1:3, b = letters[1:3])$a` should be class \"factor\" (is \"integer\")" 2/14 alike.R: alike(list(NULL, structure("a", class = "x")), list(NULL, structu [1] "`list(NULL, structure(\"a\", class = \"y\"))[[2]]` should be class \"x\" (is \"y\")" 2/14 alike.R: alike(list(integer(), data.frame(a = integer(), b = numeric()), [1] TRUE 2/14 alike.R: df.tpl <- structure(list(1:4, factor(LETTERS[1:4], levels = LETTE 2/14 alike.R: df.cur <- `row.names<-`(data.frame(id = 5:8, val = factor(LETTERS 2/14 alike.R: df.cur2 <- `row.names<-`(data.frame(id = 5:8, val = factor(LETTER 2/14 alike.R: alike(df.tpl, df.cur) [1] TRUE 2/14 alike.R: alike(df.cur, df.tpl) [1] "`names(df.tpl)[2]` should be \"val\" (is \"\")" 2/14 alike.R: alike(df.tpl, df.cur2) [1] "`row.names(df.cur2)[1]` should be \"one\" (is \"uno\")" 2/14 alike.R: df.tpl <- structure(list(1:4, letters[1:4]), names = c("id", 2/14 alike.R: df.cur <- structure(list(1:4, letters[1:4]), names = c("id", 2/14 alike.R: alike(df.tpl, df.tpl) [1] TRUE 2/14 alike.R: alike(df.tpl, df.cur) [1] "`names(df.cur)[2]` should be \"NA\" (is \"val\")" 2/14 alike.R: alike(mtcars, iris) [1] "`iris` should have 11 columns (has 5)" 2/14 alike.R: alike(mtcars, mtcars[1:10, ]) [1] "`mtcars[1:10, ]` should have 32 rows (has 10)" 2/14 alike.R: alike(mtcars[-5], mtcars) [1] "`mtcars` should have 10 columns (has 11)" 2/14 alike.R: unitizer_sect("Time Series", { 2/14 alike.R: ts.1 <- ts(runif(24), 1970, frequency = 12) 2/14 alike.R: ts.2 <- ts(runif(24), 1970, frequency = 4) 2/14 alike.R: ts.3 <- abstract(ts.1, "end") 2/14 alike.R: ts.4 <- abstract(ts.2, "frequency") 2/14 alike.R: alike(ts.1, ts.2) [1] "`tsp(ts.2)[2]` should be 1971.92 (is 1975.75)" 2/14 alike.R: alike(ts.3, ts.1) [1] TRUE 2/14 alike.R: alike(ts.1, ts.3) [1] "`tsp(ts.3)[2]` should be 1971.92 (is 0)" 2/14 alike.R: alike(ts.3, ts.2) [1] "`tsp(ts.2)[3]` should be 12 (is 4)" 2/14 alike.R: ts.5 <- ts(matrix(runif(24 * 3), ncol = 3), 1970, frequency = 12) 2/14 alike.R: ts.6 <- ts(matrix(runif(12 * 3), ncol = 3), 1970, frequency = 12) 2/14 alike.R: alike(ts.5, ts.6) [1] "`tsp(ts.6)[2]` should be 1971.92 (is 1970.92)" 2/14 alike.R: alike(ts.5, matrix(runif(24 * 3), ncol = 3)) [1] "`matrix(runif(24 * 3), ncol = 3)` should be class \"mts\" (is \"numeric\")" 2/14 alike.R: unitizer_sect("Factors", { 2/14 alike.R: f1 <- factor(letters[1:5]) 2/14 alike.R: f2 <- factor(letters[1:5], levels = letters[5:1]) 2/14 alike.R: f3 <- f1 2/14 alike.R: levels(f3)[[5]] <- "" 2/14 alike.R: f4 <- factor(c(letters[1:4], "f")) 2/14 alike.R: alike(f1, f2) [1] "`levels(f2)[1]` should be \"a\" (is \"e\")" 2/14 alike.R: alike(f1, f3) [1] "`levels(f3)[5]` should be \"e\" (is \"\")" 2/14 alike.R: alike(f1, f4) [1] "`levels(f4)[5]` should be \"e\" (is \"f\")" 2/14 alike.R: alike(f3, f1) [1] TRUE 2/14 alike.R: alike(f3, f4) [1] TRUE 2/14 alike.R: unitizer_sect("Environments / Pairlists", { 2/14 alike.R: env0 <- new.env() 2/14 alike.R: env1 <- list2env(list(a = character(), b = list(), c = NULL)) 2/14 alike.R: env2 <- list2env(list(a = "hello", b = iris, c = matrix(1:3))) 2/14 alike.R: env3 <- list2env(list(a = "hello", b = iris)) 2/14 alike.R: env4 <- list2env(list(a = "hello", b = iris, c = logical(1L), 2/14 alike.R: env5 <- list2env(list(b = iris, a = "hello", c = matrix(1:3))) 2/14 alike.R: alike(env0, env2) [1] TRUE 2/14 alike.R: alike(env1, env2) [1] TRUE 2/14 alike.R: alike(env1, env3) [1] "`env3` should contain variable `c`" 2/14 alike.R: alike(env3, env1) [1] "`length(env1$a)` should be 1 (is 0)" 2/14 alike.R: alike(env1, env4) [1] TRUE 2/14 alike.R: alike(env1, env5) [1] TRUE 2/14 alike.R: rec.env <- rec.env.cpy <- new.env() 2/14 alike.R: for (i in 1:50) { 2/14 alike.R: rec.env.cpy$a <- rec.env 2/14 alike.R: alike(rec.env, rec.env) [1] TRUE 2/14 alike.R: plst1 <- pairlist(a = character(), b = list(), c = NULL) 2/14 alike.R: plst2 <- pairlist(a = "hello", b = iris, c = matrix(1:3)) 2/14 alike.R: plst3 <- pairlist(a = "hello", b = iris) 2/14 alike.R: plst4 <- pairlist(a = "hello", b = iris, c = logical(1L), d = log 2/14 alike.R: plst5 <- pairlist(a = character(), b = list(), integer()) 2/14 alike.R: plst6 <- pairlist(a = character(), b = list(), boogey = 1:3) 2/14 alike.R: plst7 <- pairlist(a = character(), boogey = 1:3, b = list()) 2/14 alike.R: alike(plst1, plst2) [1] TRUE 2/14 alike.R: alike(plst1, plst3) [1] "`length(plst3)` should be 3 (is 2)" 2/14 alike.R: alike(plst1, plst4) [1] "`length(plst4)` should be 3 (is 4)" 2/14 alike.R: alike(plst1, plst5) [1] "`names(plst5)[[3L]]` should be \"c\" (is \"\")" 2/14 alike.R: alike(plst5, plst6) [1] TRUE 2/14 alike.R: alike(plst5, plst7) [1] "`names(plst7)[[2L]]` should be \"b\" (is \"boogey\")" 2/14 alike.R: env7 <- list2env(list(a = character(), b = plst1)) 2/14 alike.R: env8 <- list2env(list(a = letters[1:3], b = plst2)) 2/14 alike.R: env9 <- list2env(list(a = letters[1:3], b = plst5)) 2/14 alike.R: alike(env7, env8) [1] TRUE 2/14 alike.R: alike(env7, env9) [1] "`names(env9$b)[[3L]]` should be \"c\" (is \"\")" 2/14 alike.R: env.nest.1 <- env.nest.1.cpy <- new.env() 2/14 alike.R: env.nest.2 <- env.nest.2.cpy <- new.env() 2/14 alike.R: for (i in 1:26) { 2/14 alike.R: alike(env.nest.1, env.nest.2, settings = vetr_settings(env.depth. Warning in alike(env.nest.1, env.nest.2, settings = vetr_settings(env.depth.max = 16)) : `alike` environment stack exhausted at recursion depth 16; unable to recurse any further into environments; see `env.depth.max` parameter for `vetr_settings`. [1] TRUE 2/14 alike.R: alike(.GlobalEnv, env.nest.1) [1] "`env.nest.1` should be the global environment" 2/14 alike.R: unitizer_sect("Calls / Formulas", { 2/14 alike.R: alike(quote(1 + 1), quote(x + y)) [1] "`quote(x + y)[[2]]` should be \"double\" (is \"symbol\")" 2/14 alike.R: alike(quote(fun(1 + 1)), quote(fun(x + y, 9))) [1] "`quote(fun(x + y, 9))[[2]][[2]]` should be \"double\" (is \"symbol\")" 2/14 alike.R: alike(quote(fun(x + y, 9)), quote(fun(1 + 1))) [1] "`quote(fun(1 + 1))[[2]][[2]]` should be \"symbol\" (is \"double\")" 2/14 alike.R: "%plusq%" <- function(x, y) call("+", substitute(x), substitute(y 2/14 alike.R: alike(quote(1 + 1), 1 %plusq% b) [1] "`(1 %plusq% b)[[3]]` should be \"double\" (is \"symbol\")" 2/14 alike.R: fun <- function(a, b, c) NULL 2/14 alike.R: alike(quote(fun(b = fun2(x, y), 1, 3)), quote(fun(NULL, fun2(a, [1] TRUE 2/14 alike.R: (alike)(quote(fun(b = fun2(x, y), 1, 3)), quote(fun(NULL, fun2(a, [1] "`quote(fun(NULL, fun2(a, b), 1))` should have argument `b` as first argument (has unnamed argument)" 2/14 alike.R: alike(quote(fun(b = fun2(x, y), 1, 3)), quote(fun(fun2(a, b), [1] "`quote(fun(fun2(a, b), NULL, 1))[[2]]` should be \"double\" (is \"language\")" 2/14 alike.R: alike(quote(fun(a = 1)), quote(fun(b = 1))) [1] "`quote(fun(b = 1))` should have argument `a` as first argument (has `b`)" 2/14 alike.R: alike(quote(fun(1, 2)), quote(fun(1))) [1] "`quote(fun(1))` should have 2 arguments (has 1)" 2/14 alike.R: alike(quote(fun(1)), quote(fun(1, 2))) [1] "`quote(fun(1, 2))` should have 1 arguments (has 2)" 2/14 alike.R: alike(quote(fun(1, 2)), quote(fun2(1, 2))) [1] "`quote(fun2(1, 2))[[1]]` should be a call to `fun` (is a call to `fun2`)" 2/14 alike.R: alike(quote(fun(1, fun2(3))), quote(fun(1, fun(3)))) [1] "`quote(fun(1, fun(3)))[[3]][[1]]` should be a call to `fun2` (is a call to `fun`)" 2/14 alike.R: alike(quote(fun()), quote(fun(a, b, c))) [1] TRUE 2/14 alike.R: alike(quote(fun()), quote(fun2(a, b, c))) [1] "`quote(fun2(a, b, c))[[1]]` should be a call to `fun` (is a call to `fun2`)" 2/14 alike.R: alike(quote(fun(a, fun2())), quote(fun(b, fun2(a, b, c)))) [1] TRUE 2/14 alike.R: c0 <- quote(fun(a, b, a, 25)) 2/14 alike.R: c0.1 <- c0.2 <- c0 2/14 alike.R: attr(c0.1, "blah") <- "hello" 2/14 alike.R: attr(c0.2, "blah") <- 1:3 2/14 alike.R: alike(c0, c0.1) [1] TRUE 2/14 alike.R: alike(c0.1, c0) [1] "`c0` should have attribute \"blah\"" 2/14 alike.R: alike(c0.1, c0.2) [1] "`attr(c0.2, \"blah\")` should be character (is integer)" 2/14 alike.R: alike(x ~ y, z ~ w) [1] TRUE 2/14 alike.R: alike(x ~ y, z ~ w + 1) [1] "`(z ~ w + 1)[[3]]` should be \"symbol\" (is \"language\")" 2/14 alike.R: alike(x ~ y + 2, z ~ w + 1) [1] "`(z ~ w + 1)[[3]][[3]]` should have identical constant values" 2/14 alike.R: alike(x ~ y + z:y, w ~ v + u:v) [1] TRUE 2/14 alike.R: alike(z ~ w + 1, x ~ y) [1] "`(x ~ y)[[3]]` should be a call to `+` (is \"symbol\")" 2/14 alike.R: alike(y ~ x^2 + x * z + z + w:z, q ~ l^2 + l * j + j + w:j) [1] TRUE 2/14 alike.R: alike(y ~ x^2 + x * z + z + w:z, q ~ l^3 + l * j + j + w:j) [1] "`(q ~ l^3 + l * j + j + w:j)[[3]][[2]][[2]][[2]][[3]]` should have identical constant values" 2/14 alike.R: exp.1 <- parse(text = "x + y; fun2(fun(1, 2, 3), z)", keep.source 2/14 alike.R: exp.2 <- parse(text = "z + 2; fun(fun2(1, 2, 3), q)", keep.source 2/14 alike.R: exp.3 <- parse(text = "z + fun(3); fun(fun2(a, b, c), 3)", keep.s 2/14 alike.R: alike(exp.1, exp.2) [1] "`exp.2[[1]][[3]]` should be \"symbol\" (is \"double\")" 2/14 alike.R: alike(exp.2, exp.3) [1] "`exp.3[[1]][[3]]` should be \"double\" (is \"language\")" 2/14 alike.R: alike(exp.3, exp.2) [1] "`exp.2[[1]][[3]]` should be a call to `fun` (is \"double\")" 2/14 alike.R: exp.4 <- expression(1 + 1, 2 + x) 2/14 alike.R: exp.5 <- expression(1 + 1, 5 + y) 2/14 alike.R: exp.6 <- expression(1 + 1, 2 + 2) 2/14 alike.R: alike(exp.4, exp.5) [1] TRUE 2/14 alike.R: alike(exp.4, exp.6) [1] "`exp.6[[2]][[3]]` should be \"symbol\" (is \"double\")" 2/14 alike.R: alike(quote(x), quote(y)) [1] TRUE 2/14 alike.R: alike(NULL, quote(x)) [1] "`quote(x)` should be `NULL` (is \"symbol\")" 2/14 alike.R: alike(quote((NULL)), quote(y)) [1] TRUE 2/14 alike.R: alike(quote(NULL), quote(x)) [1] "`quote(x)` should be `NULL` (is \"symbol\")" 2/14 alike.R: alike(quote(x), c0) [1] "`c0` should be \"symbol\" (is \"language\")" 2/14 alike.R: alike(c0, quote(x)) [1] "`quote(x)` should be a call to `fun` (is \"symbol\")" 2/14 alike.R: alike(quote((x)), quote(y)) [1] TRUE 2/14 alike.R: unitizer_sect("Functions", { 2/14 alike.R: alike(print, print.data.frame) [1] TRUE 2/14 alike.R: alike(print.data.frame, print) [1] "`print` should have argument `digits` after argument `...`" 2/14 alike.R: alike(`&&`, function() NULL) Error in alike(`&&`, function() NULL) : argument of type NILSXP is not a closure Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> alike 2/14 alike.R: fun <- fun2 <- function() NULL 2/14 alike.R: attributes(fun2) <- NULL 2/14 alike.R: alike(fun, fun2) [1] TRUE 2/14 alike.R: alike(fun, fun2, settings = vetr_settings(attr.mode = 2L)) [1] "`fun2` should have attribute \"srcref\"" 2/14 alike.R: alike(fun2, fun, settings = vetr_settings(attr.mode = 1L)) [1] TRUE 2/14 alike.R: alike(fun2, fun, settings = vetr_settings(attr.mode = 2L)) [1] "`fun` should not have attribute \"srcref\"" 2/14 alike.R: unitizer_sect("settings", { 2/14 alike.R: alike(1L, 1, settings = vetr_settings(type.mode = 1L)) [1] "`1` should be type \"integer\" (is \"double\")" 2/14 alike.R: alike(1, 1L, settings = vetr_settings(type.mode = 1L)) [1] TRUE 2/14 alike.R: alike(1, 1L, settings = vetr_settings(type.mode = 2L)) [1] "`1L` should be type \"double\" (is \"integer\")" 2/14 alike.R: alike(1:101, 1:101 + 0) [1] "`1:101 + 0` should be type \"integer\" (is \"double\")" 2/14 alike.R: alike(1:101, 1:101 + 0, settings = vetr_settings(fuzzy.int.max.le [1] TRUE 2/14 alike.R: alike(1:101, 1:101 + 0, settings = vetr_settings(fuzzy.int.max.le [1] TRUE 2/14 alike.R: alike(list(a = 1:10), data.frame(a = 1:10)) [1] TRUE 2/14 alike.R: alike(list(a = 1:10), data.frame(a = 1:10), settings = vetr_setti [1] TRUE 2/14 alike.R: alike(list(a = 1:10), data.frame(a = 1:10), settings = vetr_setti [1] "`data.frame(a = 1:10)` should not have attribute \"class\"" 2/14 alike.R: fun <- function(a, b, c) NULL 2/14 alike.R: call.a <- quote(fun(b = fun2(x, y), 1, 3)) 2/14 alike.R: call.b <- quote(fun(NULL, fun2(a, b), 1)) 2/14 alike.R: alike(call.a, call.b, settings = vetr_settings(env = emptyenv())) [1] "`call.b` should have argument `b` as first argument (has unnamed argument)" 2/14 alike.R: alike(call.a, call.b, env = emptyenv()) [1] "`call.b` should have argument `b` as first argument (has unnamed argument)" 2/14 alike.R: alike(call.a, call.b, env = emptyenv(), settings = vetr_settings( [1] TRUE 2/14 alike.R: alike(call.a, call.b) [1] TRUE 2/14 alike.R: alike(`&&`, function() NULL, settings = vetr_settings(type.mode = Error in alike(`&&`, function() NULL, settings = vetr_settings(type.mode = 1)) : argument of type NILSXP is not a closure Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> alike 2/14 alike.R: alike(1, 2, settings = letters) Error in alike(1, 2, settings = letters) : `vet/vetr` usage error: argument `settings` must be a list or NULL (is character). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> alike 2/14 alike.R: alike(1, 2, settings = list()) Error in alike(1, 2, settings = list()) : `vet/vetr` usage error: `settings` must be a list of length 16. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> alike 2/14 alike.R: alike(1, 2, settings = setNames(vector("list", 16), letters[1:16] Error in alike(1, 2, settings = setNames(vector("list", 16), letters[1:16])) : `vet/vetr` usage error: argument `settings` names are not in format produced by `vetr_settings`. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> alike 2/14 alike.R: alike(1, 2, settings = vector("list", 16)) Error in alike(1, 2, settings = vector("list", 16)) : `vet/vetr` usage error: argument `settings` must be a named list as produced by `vetr_settings`. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> alike 2/14 alike.R: unitizer_sect("Examples", { 2/14 alike.R: alike(1L, 1) [1] TRUE 2/14 alike.R: alike(1L, 1.1) [1] "`1.1` should be type \"integer-like\" (is \"double\")" 2/14 alike.R: alike(1.1, 1L) [1] TRUE 2/14 alike.R: alike(1:100, 1:100 + 0) [1] TRUE 2/14 alike.R: alike(1:101, 1:101 + 0) [1] "`1:101 + 0` should be type \"integer\" (is \"double\")" 2/14 alike.R: alike(integer(1L), 1) [1] TRUE 2/14 alike.R: alike(logical(1L), TRUE) [1] TRUE 2/14 alike.R: alike(integer(1L), 1:3) [1] "`length(1:3)` should be 1 (is 3)" 2/14 alike.R: alike(logical(1L), c(TRUE, TRUE)) [1] "`length(c(TRUE, TRUE))` should be 1 (is 2)" 2/14 alike.R: alike(integer(), 1:10) [1] TRUE 2/14 alike.R: alike(1:10, integer()) [1] "`length(integer())` should be 10 (is 0)" 2/14 alike.R: alike(list(integer(), list(character(), logical(1L))), list(1:10, [1] TRUE 2/14 alike.R: alike(list(integer(), list(character(), logical(1L))), list(1:10, [1] "`length(list(1:10, list(letters, c(TRUE, FALSE)))[[2]][[2]])` should be 1 (is 2)" 2/14 alike.R: alike(list(NULL, NULL), list(iris, mtcars)) [1] TRUE 2/14 alike.R: alike(NULL, mtcars) [1] "`mtcars` should be `NULL` (is \"list\")" 2/14 alike.R: iris.fake <- transform(iris, Species = as.character(Species)) 2/14 alike.R: alike(iris, iris.fake) [1] "`iris.fake$Species` should be class \"factor\" (is \"character\")" 2/14 alike.R: iris.fake2 <- transform(iris, Species = factor(Species, levels = 2/14 alike.R: alike(iris, iris.fake2) [1] "`levels(iris.fake2$Species)[3]` should be \"virginica\" (is \"americana\")" 2/14 alike.R: iris.tpl <- abstract(iris) 2/14 alike.R: str(iris.tpl) 'data.frame': 0 obs. of 5 variables: $ Sepal.Length: num $ Sepal.Width : num $ Petal.Length: num $ Petal.Width : num $ Species : Factor w/ 3 levels "setosa","versicolor",..: 2/14 alike.R: alike(iris.tpl, iris) [1] TRUE 2/14 alike.R: alike(iris.tpl, iris[sample(1:nrow(iris), 10), ]) [1] TRUE 2/14 alike.R: alike(iris.tpl, iris[c(2, 1, 3, 4, 5)]) [1] "`names(iris[c(2, 1, 3, 4, 5)])[1]` should be \"Sepal.Length\" (is \"Sepal.Width\")" 2/14 alike.R: alike(matrix(integer(), 3, 3), matrix(1:9, nrow = 3)) [1] TRUE 2/14 alike.R: alike(matrix(integer(), 3, 3), matrix(runif(9), nrow = 3)) [1] "`matrix(runif(9), nrow = 3)` should be type \"integer-like\" (is \"double\")" 2/14 alike.R: alike(matrix(integer(), 3), matrix(1:12, nrow = 3)) [1] TRUE 2/14 alike.R: alike(matrix(integer(), 3), matrix(1:12, nrow = 4)) [1] "`matrix(1:12, nrow = 4)` should have 3 rows (has 4)" 2/14 alike.R: alike(matrix(logical()), array(rep(TRUE, 8), rep(2, 3))) [1] "`array(rep(TRUE, 8), rep(2, 3))` should be \"matrix\" (is \"array\")" 2/14 alike.R: obj.tpl <- structure(TRUE, class = letters[1:3]) 2/14 alike.R: obj.cur.1 <- structure(TRUE, class = c("x", letters[1:3])) 2/14 alike.R: obj.cur.2 <- structure(TRUE, class = c(letters[1:3], "x")) 2/14 alike.R: alike(obj.tpl, obj.cur.1) [1] TRUE 2/14 alike.R: alike(obj.tpl, obj.cur.2) [1] "`class(obj.cur.2)[2]` should be \"a\" (is \"b\")" 2/14 alike.R: alike(quote(x + y), quote(a + b)) [1] TRUE 2/14 alike.R: alike(quote(x + y), quote(a - b)) [1] "`quote(a - b)[[1]]` should be a call to `+` (is a call to `-`)" 2/14 alike.R: alike(quote(x + y), quote(a + a)) [1] "`quote(a + a)[[3]]` should not be `a`" 2/14 alike.R: unitizer_sect("Raw", { 2/14 alike.R: alike(as.raw(integer(3)), as.raw(integer(3))) Warning in alike(as.raw(integer(3)), as.raw(integer(3))) : `alike` behavior for objects of type "raw" is not well defined and may change in the future [1] TRUE 2/14 alike.R: unitizer_sect("Errors", { 2/14 alike.R: alike(NULL, NULL, settings = vetr_settings(type.mode = 3)) Error in alike(NULL, NULL, settings = vetr_settings(type.mode = 3)) : Setting `type.mode` must be scalar integer between 0 and 2 (is 3). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> alike 2/14 alike.R: alike(NULL, NULL, settings = vetr_settings(attr.mode = letters)) Error in alike(NULL, NULL, settings = vetr_settings(attr.mode = letters)) : Setting `attr.mode` must be integer-like (is character). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> alike 2/14 alike.R: alike(NULL, NULL, settings = vetr_settings(lang.mode = letters)) Error in alike(NULL, NULL, settings = vetr_settings(lang.mode = letters)) : Setting `lang.mode` must be integer-like (is character). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> alike 2/14 alike.R: alike(NULL, NULL, settings = vetr_settings(fuzzy.int.max.len = NA Error in alike(NULL, NULL, settings = vetr_settings(fuzzy.int.max.len = NA_integer_)) : Setting `fuzzy.int.max.len` may not be NA. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> alike 2/14 alike.R: alike(NULL, NULL, settings = vetr_settings(suppress.warnings = NA Error in alike(NULL, NULL, settings = vetr_settings(suppress.warnings = NA)) : `vet/vetr` usage error: setting `suppress.warnings` must be TRUE or FALSE Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> alike 2/14 alike.R: alike(NULL, NULL, settings = vetr_settings(env = letters)) Error in alike(NULL, NULL, settings = vetr_settings(env = letters)) : `ver/vetr` usage error: setting `env` must be an environment or NULL Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> alike 2/14 alike.R: alike(NULL, NULL, settings = vetr_settings(width = letters)) Error in alike(NULL, NULL, settings = vetr_settings(width = letters)) : Setting `width` must be integer-like (is character). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> alike 2/14 alike.R: alike(NULL, NULL, settings = vetr_settings(env.depth.max = -1L)) [1] TRUE 2/14 alike.R: unitizer_sect("Attributes", { 2/14 alike.R: obj.tpl <- structure(integer(), a = integer()) 2/14 alike.R: obj.obj <- structure(1:10, a = 1:3) 2/14 alike.R: alike(obj.tpl, obj.obj) [1] TRUE 2/14 alike.R: obj.tpl.a <- structure(integer(), class = "foo") 2/14 alike.R: obj.obj.a <- structure(matrix(1:3)) 2/14 alike.R: alike(obj.tpl.a, obj.obj.a) [1] "`obj.obj.a` should be class \"foo\" (is \"integer\")" 2/14 alike.R: obj.tpl.b <- structure(matrix(integer()), class = "foo") 2/14 alike.R: obj.obj.b <- structure(matrix(1:3)) 2/14 alike.R: alike(obj.tpl.b, obj.obj.b) [1] "`obj.obj.b` should be class \"foo\" (is \"integer\")" 2/14 alike.R: obj.tpl.c <- structure(matrix(integer()), class = "foo") 2/14 alike.R: obj.obj.c <- structure(matrix(1:3), class = "foo") 2/14 alike.R: alike(obj.tpl.c, obj.obj.c) [1] TRUE 2/14 alike.R: obj.tpl.d <- structure(integer(), class = "foo") 2/14 alike.R: obj.obj.d <- structure(matrix(1:3), class = "foo") 2/14 alike.R: alike(obj.tpl.d, obj.obj.d) [1] TRUE 2/14 alike.R: obj.tpl.e <- structure(integer()) 2/14 alike.R: obj.obj.e <- structure(matrix(1:3), class = "foo") 2/14 alike.R: alike(obj.tpl.e, obj.obj.e) [1] TRUE 2/14 alike.R: obj.tpl.f <- structure(integer(), a = integer()) 2/14 alike.R: obj.obj.f <- structure(matrix(1:3), z = integer(), class = "foo") 2/14 alike.R: alike(obj.tpl.f, obj.obj.f) [1] "`obj.obj.f` should have attribute \"a\"" 2/14 alike.R: obj.tpl.g <- structure(integer(), a = integer()) 2/14 alike.R: obj.obj.g <- structure(matrix(1:3), z = integer(), class = "foo") 2/14 alike.R: alike(obj.tpl.g, obj.obj.g) [1] "`obj.obj.g` should have attribute \"a\"" 2/14 alike.R: obj.tpl.h <- structure(matrix(integer())) 2/14 alike.R: obj.obj.h <- structure(1:3, a = integer()) 2/14 alike.R: alike(obj.tpl.h, obj.obj.h) [1] "`obj.obj.h` should be \"matrix\" (is \"integer\")" 2/14 alike.R: alike(obj.tpl.h, obj.obj.h, settings = vetr_settings(attr.mode = [1] "`obj.obj.h` should have attribute \"dim\"" 2/14 alike.R: obj.tpl.i <- structure(character(), a = integer(), class = "boo") 2/14 alike.R: obj.obj.i <- structure(matrix(1:3)) 2/14 alike.R: alike(obj.tpl.i, obj.obj.i) [1] "`obj.obj.i` should be class \"boo\" (is \"integer\")" 2/14 alike.R: obj.tpl.k <- integer() 2/14 alike.R: obj.obj.k <- matrix(1:3) 2/14 alike.R: alike(obj.tpl.k, obj.obj.k) [1] TRUE 2/14 alike.R: alike(obj.tpl.k, obj.obj.k, settings = vetr_settings(attr.mode = [1] "`obj.obj.k` should not have attribute \"dim\"" 3/14 all-bw.R: 3/14 all-bw.R: library(vetr) 3/14 all-bw.R: set.seed(42) 3/14 all-bw.R: x <- runif(100) 3/14 all-bw.R: x[1] <- 1 3/14 all-bw.R: x[2] <- 0 3/14 all-bw.R: unitizer_sect("all_bw - real", { 3/14 all-bw.R: all_bw(x, 0, 1) [1] TRUE 3/14 all-bw.R: all_bw(x, 0, 1, bounds = "[)") [1] "`1` at index 1 not in `[0,1)`" 3/14 all-bw.R: all_bw(x, 0, 1, bounds = "(]") [1] "`0` at index 2 not in `(0,1]`" 3/14 all-bw.R: all_bw(x, 0, 1, bounds = "()") [1] "`1` at index 1 not in `(0,1)`" 3/14 all-bw.R: all_bw(x, 0, 1 + 1e-06, bounds = "[)") [1] TRUE 3/14 all-bw.R: all_bw(x, 0 - 1e-06, 1, bounds = "(]") [1] TRUE 3/14 all-bw.R: all_bw(x, 0 - 1e-06, 1 + 1e-06, bounds = "()") [1] TRUE 3/14 all-bw.R: y <- z <- x 3/14 all-bw.R: y[50] <- NA 3/14 all-bw.R: z[50] <- NaN 3/14 all-bw.R: all_bw(y, 0, 1) [1] "`NA` at index 50 not in `[0,1]`" 3/14 all-bw.R: all_bw(y, 0, 1, na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(y, 0.5, 0.75, na.rm = TRUE) [1] "`1` at index 1 not in `[0.500000,0.750000]`" 3/14 all-bw.R: all_bw(y, -1, 2, na.rm = TRUE, bounds = "()") [1] TRUE 3/14 all-bw.R: all_bw(y, 0, 1, na.rm = TRUE, bounds = "()") [1] "`1` at index 1 not in `(0,1)`" 3/14 all-bw.R: all_bw(y, 0 - 1e-06, 1, na.rm = TRUE, bounds = "(]") [1] TRUE 3/14 all-bw.R: all_bw(y, 0, 1, na.rm = TRUE, bounds = "(]") [1] "`0` at index 2 not in `(0,1]`" 3/14 all-bw.R: all_bw(y, 0, 1 + 1e-06, na.rm = TRUE, bounds = "[)") [1] TRUE 3/14 all-bw.R: all_bw(y, 0, 1, na.rm = TRUE, bounds = "[)") [1] "`1` at index 1 not in `[0,1)`" 3/14 all-bw.R: all_bw(z, 0, 1) [1] "`NaN` at index 50 not in `[0,1]`" 3/14 all-bw.R: all_bw(z, 0, 1, na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(z) [1] "`NaN` at index 50 not in `[-Inf,Inf]`" 3/14 all-bw.R: all_bw(z, na.rm = TRUE) [1] TRUE 3/14 all-bw.R: w <- runif(1000, -1000, 1000) 3/14 all-bw.R: all_bw(w, -1000, 1000) [1] TRUE 3/14 all-bw.R: all_bw(w, -1500, 500) [1] "`813.406915` at index 1 not in `[-1500,500]`" 3/14 all-bw.R: all_bw(w, -500, 1500) [1] "`-681.421638` at index 12 not in `[-500,1500]`" 3/14 all-bw.R: unitizer_sect("corner cases - real", { 3/14 all-bw.R: all_bw(x, 0, 0) [1] "`1` at index 1 not in `[0,0]`" 3/14 all-bw.R: all_bw(0, 0, 0) [1] TRUE 3/14 all-bw.R: all_bw(0, 0, 0, bounds = "()") [1] "`0` at index 1 not in `(0,0)`" 3/14 all-bw.R: all_bw(NA_real_) [1] "`NA` at index 1 not in `[-Inf,Inf]`" 3/14 all-bw.R: all_bw(NA_real_, bounds = "()") [1] "`NA` at index 1 not in `(-Inf,Inf)`" 3/14 all-bw.R: all_bw(numeric(), 0, 1) [1] TRUE 3/14 all-bw.R: all_bw(numeric(), 0, 0, bounds = "()") [1] TRUE 3/14 all-bw.R: unitizer_sect("Infinity - real", { 3/14 all-bw.R: n1e100 <- 1e+100 3/14 all-bw.R: n_1e100 <- -1e+100 3/14 all-bw.R: n2e100 <- 2e+100 3/14 all-bw.R: n_2e100 <- -2e+100 3/14 all-bw.R: n11e100 <- 1.1e+100 3/14 all-bw.R: n_11e100 <- -1.1e+100 3/14 all-bw.R: n1e200 <- 1e+200 3/14 all-bw.R: n_1e200 <- -1e+200 3/14 all-bw.R: z <- runif(100, n_1e100, n1e100) 3/14 all-bw.R: z[1] <- n_1e100 3/14 all-bw.R: z[2] <- n1e100 3/14 all-bw.R: r <- w <- v <- u <- x <- z 3/14 all-bw.R: all_bw(z, -Inf, n1e100) [1] TRUE 3/14 all-bw.R: all_bw(z, -Inf, n1e100, bounds = "[)") [1] "`1.000000e+100` at index 2 not in `[-Inf,1.000000e+100)`" 3/14 all-bw.R: all_bw(z, -Inf, n1e100, bounds = "()") [1] "`1.000000e+100` at index 2 not in `(-Inf,1.000000e+100)`" 3/14 all-bw.R: all_bw(z, -Inf, n1e100, bounds = "(]") [1] TRUE 3/14 all-bw.R: all_bw(c(z, n2e100), -Inf, n1e100, bounds = "(]") [1] "`2.000000e+100` at index 101 not in `(-Inf,1.000000e+100]`" 3/14 all-bw.R: all_bw(z, -Inf, n11e100, bounds = "[)") [1] TRUE 3/14 all-bw.R: all_bw(z, -Inf, n11e100, bounds = "()") [1] TRUE 3/14 all-bw.R: all_bw(z, n_1e100, Inf) [1] TRUE 3/14 all-bw.R: all_bw(z, n_1e100, Inf, bounds = "(]") [1] "`-1.000000e+100` at index 1 not in `(-1.000000e+100,Inf]`" 3/14 all-bw.R: all_bw(z, n_1e100, Inf, bounds = "()") [1] "`-1.000000e+100` at index 1 not in `(-1.000000e+100,Inf)`" 3/14 all-bw.R: all_bw(z, n_1e100, Inf, bounds = "[)") [1] TRUE 3/14 all-bw.R: all_bw(c(z, n_2e100), n_1e100, Inf, bounds = "[)") [1] "`-2.000000e+100` at index 101 not in `[-1.000000e+100,Inf)`" 3/14 all-bw.R: all_bw(z, n_11e100, Inf, bounds = "(]") [1] TRUE 3/14 all-bw.R: all_bw(z, n_11e100, Inf, bounds = "()") [1] TRUE 3/14 all-bw.R: r[50] <- NA_real_ 3/14 all-bw.R: all_bw(r, -Inf, n1e100) [1] "`NA` at index 50 not in `[-Inf,1.000000e+100]`" 3/14 all-bw.R: all_bw(r, -Inf, n1e100, bounds = "[)") [1] "`1.000000e+100` at index 2 not in `[-Inf,1.000000e+100)`" 3/14 all-bw.R: all_bw(r, -Inf, n1e100, bounds = "()") [1] "`1.000000e+100` at index 2 not in `(-Inf,1.000000e+100)`" 3/14 all-bw.R: all_bw(r, -Inf, n1e100, bounds = "(]") [1] "`NA` at index 50 not in `(-Inf,1.000000e+100]`" 3/14 all-bw.R: all_bw(r, -Inf, n11e100, bounds = "[)") [1] "`NA` at index 50 not in `[-Inf,1.100000e+100)`" 3/14 all-bw.R: all_bw(r, -Inf, n11e100, bounds = "()") [1] "`NA` at index 50 not in `(-Inf,1.100000e+100)`" 3/14 all-bw.R: all_bw(r, n_1e100, Inf) [1] "`NA` at index 50 not in `[-1.000000e+100,Inf]`" 3/14 all-bw.R: all_bw(r, n_1e100, Inf, bounds = "(]") [1] "`-1.000000e+100` at index 1 not in `(-1.000000e+100,Inf]`" 3/14 all-bw.R: all_bw(r, n_1e100, Inf, bounds = "()") [1] "`-1.000000e+100` at index 1 not in `(-1.000000e+100,Inf)`" 3/14 all-bw.R: all_bw(r, n_1e100, Inf, bounds = "[)") [1] "`NA` at index 50 not in `[-1.000000e+100,Inf)`" 3/14 all-bw.R: all_bw(r, n_11e100, Inf, bounds = "(]") [1] "`NA` at index 50 not in `(-1.100000e+100,Inf]`" 3/14 all-bw.R: all_bw(r, n_11e100, Inf, bounds = "()") [1] "`NA` at index 50 not in `(-1.100000e+100,Inf)`" 3/14 all-bw.R: all_bw(r, -Inf, n1e100, na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(r, -Inf, n1e100, bounds = "[)", na.rm = TRUE) [1] "`1.000000e+100` at index 2 not in `[-Inf,1.000000e+100)`" 3/14 all-bw.R: all_bw(r, -Inf, n1e100, bounds = "()", na.rm = TRUE) [1] "`1.000000e+100` at index 2 not in `(-Inf,1.000000e+100)`" 3/14 all-bw.R: all_bw(r, -Inf, n1e100, bounds = "(]", na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(r, -Inf, n11e100, bounds = "[)", na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(r, -Inf, n11e100, bounds = "()", na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(r, n_1e100, Inf, na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(r, n_1e100, Inf, bounds = "(]", na.rm = TRUE) [1] "`-1.000000e+100` at index 1 not in `(-1.000000e+100,Inf]`" 3/14 all-bw.R: all_bw(r, n_1e100, Inf, bounds = "()", na.rm = TRUE) [1] "`-1.000000e+100` at index 1 not in `(-1.000000e+100,Inf)`" 3/14 all-bw.R: all_bw(r, n_1e100, Inf, bounds = "[)", na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(r, n_11e100, Inf, bounds = "(]", na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(r, n_11e100, Inf, bounds = "()", na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(c(r, n2e100), -Inf, n1e100, na.rm = TRUE) [1] "`2.000000e+100` at index 101 not in `[-Inf,1.000000e+100]`" 3/14 all-bw.R: all_bw(c(r, n_2e100), n_1e100, Inf, na.rm = TRUE) [1] "`-2.000000e+100` at index 101 not in `[-1.000000e+100,Inf]`" 3/14 all-bw.R: all_bw(z, -Inf, Inf) [1] TRUE 3/14 all-bw.R: u[50] <- -Inf 3/14 all-bw.R: all_bw(u, n_1e200, n1e200) [1] "`-Inf` at index 50 not in `[-1.000000e+200,1.000000e+200]`" 3/14 all-bw.R: v[50] <- Inf 3/14 all-bw.R: all_bw(v, n_1e200, n1e200) [1] "`Inf` at index 50 not in `[-1.000000e+200,1.000000e+200]`" 3/14 all-bw.R: w[50] <- -Inf 3/14 all-bw.R: w[51] <- Inf 3/14 all-bw.R: all_bw(w, -Inf, Inf) [1] TRUE 3/14 all-bw.R: all_bw(w, -Inf, Inf, bounds = "[)") [1] "`Inf` at index 51 not in `[-Inf,Inf)`" 3/14 all-bw.R: all_bw(w, -Inf, Inf, bounds = "(]") [1] "`-Inf` at index 50 not in `(-Inf,Inf]`" 3/14 all-bw.R: x.int <- sample(-50:50) 3/14 all-bw.R: unitizer_sect("all_bw - int", { 3/14 all-bw.R: all_bw(x.int, -50, 50) [1] TRUE 3/14 all-bw.R: all_bw(x.int, -50L, 50L) [1] TRUE 3/14 all-bw.R: all_bw(x.int, -50, 50, bounds = "[)") [1] "`50` at index 96 not in `[-50,50)`" 3/14 all-bw.R: all_bw(x.int, -50, 50, bounds = "(]") [1] "`-50` at index 37 not in `(-50,50]`" 3/14 all-bw.R: all_bw(x.int, -50, 50, bounds = "()") [1] "`-50` at index 37 not in `(-50,50)`" 3/14 all-bw.R: all_bw(x.int, -50, 50 + 1e-06, bounds = "[)") [1] TRUE 3/14 all-bw.R: all_bw(x.int, -50 - 1e-06, 50, bounds = "(]") [1] TRUE 3/14 all-bw.R: all_bw(x.int, -50 - 1e-06, 50 + 1e-06, bounds = "()") [1] TRUE 3/14 all-bw.R: y.int <- z.int <- x.int 3/14 all-bw.R: y.int[50] <- NA 3/14 all-bw.R: all_bw(y.int, -50, 50) [1] "`NA` at index 50 not in `[-50,50]`" 3/14 all-bw.R: all_bw(y.int, -50, 50, na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(y.int, -49.5, 49.5, na.rm = TRUE) [1] "`-50` at index 37 not in `[-49.500000,49.500000]`" 3/14 all-bw.R: all_bw(y.int, -51, 51, na.rm = TRUE, bounds = "()") [1] TRUE 3/14 all-bw.R: all_bw(y.int, -50.5, 50.5, na.rm = TRUE, bounds = "()") [1] TRUE 3/14 all-bw.R: all_bw(y.int, -50, 50, na.rm = TRUE, bounds = "()") [1] "`-50` at index 37 not in `(-50,50)`" 3/14 all-bw.R: all_bw(y.int, -50 - 1e-06, 50, na.rm = TRUE, bounds = "(]") [1] TRUE 3/14 all-bw.R: all_bw(y.int, -50, 50, na.rm = TRUE, bounds = "(]") [1] "`-50` at index 37 not in `(-50,50]`" 3/14 all-bw.R: all_bw(y.int, -50, 50 + 1e-06, na.rm = TRUE, bounds = "[)") [1] TRUE 3/14 all-bw.R: all_bw(y.int, -50, 50, na.rm = TRUE, bounds = "[)") [1] "`50` at index 96 not in `[-50,50)`" 3/14 all-bw.R: unitizer_sect("corner cases - int", { 3/14 all-bw.R: all_bw(x.int, 0, 0) [1] "`-12` at index 1 not in `[0,0]`" 3/14 all-bw.R: all_bw(0L, 0, 0) [1] TRUE 3/14 all-bw.R: all_bw(0L, 0, 0, bounds = "()") [1] "`0` at index 1 not in `(0,0)`" 3/14 all-bw.R: all_bw(NA_integer_) [1] "`NA` at index 1 not in `[-Inf,Inf]`" 3/14 all-bw.R: all_bw(NA) [1] "`NA` at index 1 not in `[-Inf,Inf]`" 3/14 all-bw.R: unitizer_sect("Infinity - int", { 3/14 all-bw.R: int.max <- (Reduce(`*`, rep(2L, 30L)) - 1L) * 2L + 1L 3/14 all-bw.R: int.min <- -int.max 3/14 all-bw.R: z.int <- x.int 3/14 all-bw.R: z.int[1] <- int.max 3/14 all-bw.R: z.int[2] <- int.min 3/14 all-bw.R: r.int <- w.int <- v.int <- u.int <- x.int <- z.int 3/14 all-bw.R: all_bw(z.int, -Inf, int.max) [1] TRUE 3/14 all-bw.R: all_bw(z.int, -Inf, int.max, bounds = "[)") [1] "`2147483647` at index 1 not in `[-Inf,2147483647)`" 3/14 all-bw.R: all_bw(z.int, -Inf, int.max, bounds = "()") [1] "`2147483647` at index 1 not in `(-Inf,2147483647)`" 3/14 all-bw.R: all_bw(z.int, -Inf, int.max, bounds = "(]") [1] TRUE 3/14 all-bw.R: all_bw(z.int, -Inf, int.max - 1L, bounds = "(]") [1] "`2147483647` at index 1 not in `(-Inf,2147483646]`" 3/14 all-bw.R: all_bw(z.int, int.min - 1, int.max + 1) [1] TRUE 3/14 all-bw.R: all_bw(z.int, int.min - 1, int.max + 1, bounds = "()") [1] TRUE 3/14 all-bw.R: all_bw(int.max - 1L, -Inf, int.max, bounds = "()") [1] TRUE 3/14 all-bw.R: all_bw(z.int, int.min, Inf) [1] TRUE 3/14 all-bw.R: all_bw(z.int, int.min, Inf, bounds = "(]") [1] "`-2147483647` at index 2 not in `(-2147483647,Inf]`" 3/14 all-bw.R: all_bw(z.int, int.min, Inf, bounds = "()") [1] "`-2147483647` at index 2 not in `(-2147483647,Inf)`" 3/14 all-bw.R: all_bw(z.int, int.min, Inf, bounds = "[)") [1] TRUE 3/14 all-bw.R: all_bw(z.int, int.min + 1L, Inf, bounds = "[)") [1] "`-2147483647` at index 2 not in `[-2147483646,Inf)`" 3/14 all-bw.R: r.int[50] <- NA_integer_ 3/14 all-bw.R: all_bw(r.int, -Inf, int.max) [1] "`NA` at index 50 not in `[-Inf,2147483647]`" 3/14 all-bw.R: all_bw(r.int, -Inf, int.max, bounds = "[)") [1] "`2147483647` at index 1 not in `[-Inf,2147483647)`" 3/14 all-bw.R: all_bw(r.int, -Inf, int.max, bounds = "()") [1] "`2147483647` at index 1 not in `(-Inf,2147483647)`" 3/14 all-bw.R: all_bw(r.int, -Inf, int.max, bounds = "(]") [1] "`NA` at index 50 not in `(-Inf,2147483647]`" 3/14 all-bw.R: all_bw(r.int, -Inf, int.max - 10, bounds = "(]") [1] "`2147483647` at index 1 not in `(-Inf,2147483637]`" 3/14 all-bw.R: all_bw(z.int, -Inf, int.max - 1L, bounds = "(]", na.rm = TRUE) [1] "`2147483647` at index 1 not in `(-Inf,2147483646]`" 3/14 all-bw.R: all_bw(c(int.max - 1L, NA), -Inf, int.max, bounds = "()", na.rm [1] TRUE 3/14 all-bw.R: all_bw(r.int, int.min, Inf) [1] "`NA` at index 50 not in `[-2147483647,Inf]`" 3/14 all-bw.R: all_bw(r.int, int.min, Inf, bounds = "(]") [1] "`-2147483647` at index 2 not in `(-2147483647,Inf]`" 3/14 all-bw.R: all_bw(r.int, int.min, Inf, bounds = "()") [1] "`-2147483647` at index 2 not in `(-2147483647,Inf)`" 3/14 all-bw.R: all_bw(r.int, int.min, Inf, bounds = "[)") [1] "`NA` at index 50 not in `[-2147483647,Inf)`" 3/14 all-bw.R: all_bw(r.int, -Inf, int.max, na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(r.int, -Inf, int.max, bounds = "[)", na.rm = TRUE) [1] "`2147483647` at index 1 not in `[-Inf,2147483647)`" 3/14 all-bw.R: all_bw(r.int, -Inf, int.max, bounds = "()", na.rm = TRUE) [1] "`2147483647` at index 1 not in `(-Inf,2147483647)`" 3/14 all-bw.R: all_bw(r.int, -Inf, int.max, bounds = "(]", na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(r.int, int.min + 10, Inf, bounds = "[)", na.rm = TRUE) [1] "`-2147483647` at index 2 not in `[-2147483637,Inf)`" 3/14 all-bw.R: all_bw(r.int, int.min, Inf, na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(r.int, int.min, Inf, bounds = "(]", na.rm = TRUE) [1] "`-2147483647` at index 2 not in `(-2147483647,Inf]`" 3/14 all-bw.R: all_bw(r.int, int.min, Inf, bounds = "()", na.rm = TRUE) [1] "`-2147483647` at index 2 not in `(-2147483647,Inf)`" 3/14 all-bw.R: all_bw(r.int, int.min, Inf, bounds = "[)", na.rm = TRUE) [1] TRUE 3/14 all-bw.R: unitizer_sect("error", { 3/14 all-bw.R: all_bw(x, 0, -1) Error in all_bw(x, 0, -1) : Argument `hi` (-1) must be greater than or equal to `lo` (0). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, -1, 1, na.rm = 1) Error in all_bw(x, -1, 1, na.rm = 1) : Argument `na_rm` must be logical (is double). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, -1, 1, na.rm = c(TRUE, FALSE)) Error in all_bw(x, -1, 1, na.rm = c(TRUE, FALSE)) : Argument `na_rm` must be length 1 (is 2). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, -1, 1, na.rm = NA) Error in all_bw(x, -1, 1, na.rm = NA) : Argument `na_rm` must be TRUE or FALSE (is NA). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, -1, 1, bounds = TRUE) Error in all_bw(x, -1, 1, bounds = TRUE) : Argument `bounds` must be character (is logical). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, -1, 1, bounds = letters) Error in all_bw(x, -1, 1, bounds = letters) : Argument `bounds` must be length 1 (is 26). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, -1, 1, bounds = "[[") Error in all_bw(x, -1, 1, bounds = "[[") : Argument `bounds` must be character(1L) in "[]", "[)", "(]", "()" Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, -1, 1, bounds = "))") Error in all_bw(x, -1, 1, bounds = "))") : Argument `bounds` must be character(1L) in "[]", "[)", "(]", "()" Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, -1, 1, bounds = "[") Error in all_bw(x, -1, 1, bounds = "[") : Argument `bounds` must be character(1L) in "[]", "[)", "(]", "()" Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, -1, 1, bounds = "[.]") Error in all_bw(x, -1, 1, bounds = "[.]") : Argument `bounds` must be character(1L) in "[]", "[)", "(]", "()" Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, -1, 1, bounds = NA_character_) Error in all_bw(x, -1, 1, bounds = NA_character_) : Argument `bounds` may not be NA. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, 1:3, 4) Error in all_bw(x, 1:3, 4) : Argument `lo` must be length 1 (is 3). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, 1, 4:5) Error in all_bw(x, 1, 4:5) : Argument `hi` must be length 1 (is 2). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(list(), 1, 2) Error in all_bw(list(), 1, 2) : Argument `x` must be numeric-like or character (is list). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, list(), 2) Error in all_bw(x, list(), 2) : Argument `lo` must be length 1 (is 0). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, 1, list()) Error in all_bw(x, 1, list()) : Argument `hi` must be length 1 (is 0). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, list(1), 2) Error in all_bw(x, list(1), 2) : Argument `lo` must be logical, integer, numeric, or character (is list). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, 1, list(1)) Error in all_bw(x, 1, list(1)) : Argument `hi` must be logical, integer, numeric, or character (is list). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, "a", 1) Error in all_bw(x, "a", 1) : Argument `x` is numeric-like, but `lo` is character. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, 1, "a") Error in all_bw(x, 1, "a") : Argument `x` is numeric-like, but `hi` is character. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: unitizer_sect("all_bw - strings", { 3/14 all-bw.R: two.let <- two.let.na <- two.let.inf <- c(letters, do.call(paste 3/14 all-bw.R: all_bw(letters, "a", "z") [1] TRUE 3/14 all-bw.R: all_bw(letters, "z", "a") Error in all_bw(letters, "z", "a") : Argument `hi` (z) must be greater than or equal to `lo` (a). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(letters, "a", "z", bounds = "[)") [1] "`\"z\"` at index 26 not in `[\"a\",\"z\")`" 3/14 all-bw.R: all_bw(letters, "a", "z", bounds = "(]") [1] "`\"a\"` at index 1 not in `(\"a\",\"z\"]`" 3/14 all-bw.R: all_bw(two.let, "aa", "zz") [1] "`\"a\"` at index 1 not in `[\"aa\",\"zz\"]`" 3/14 all-bw.R: all_bw(two.let, "a", "zz") [1] TRUE 3/14 all-bw.R: all_bw(two.let, "a", "zz", bounds = "()") [1] "`\"a\"` at index 1 not in `(\"a\",\"zz\")`" 3/14 all-bw.R: all_bw("A", "a", "z", bounds = "(]") [1] "`\"A\"` at index 1 not in `(\"a\",\"z\"]`" 3/14 all-bw.R: two.let.2 <- tail(head(two.let, -1), -1) 3/14 all-bw.R: all_bw(two.let.2, "a", "zz", bounds = "()") [1] TRUE 3/14 all-bw.R: all_bw(two.let.2, "a", "zz", bounds = "[)") [1] TRUE 3/14 all-bw.R: all_bw(two.let.2, "a", "zz", bounds = "(]") [1] TRUE 3/14 all-bw.R: two.let.2[50] <- NA_character_ 3/14 all-bw.R: all_bw(two.let.2, "a", "zz", bounds = "()", na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(two.let.2, "a", "zz", bounds = "[)", na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(two.let.2, "a", "zz", bounds = "(]", na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(two.let, -Inf, Inf, bounds = "()") [1] TRUE 3/14 all-bw.R: all_bw(two.let, -Inf, Inf, bounds = "[)") [1] TRUE 3/14 all-bw.R: all_bw(two.let, -Inf, Inf, bounds = "(]") [1] TRUE 3/14 all-bw.R: all_bw(two.let, -Inf, Inf, bounds = "[]") [1] TRUE 3/14 all-bw.R: all_bw(two.let, "a", Inf, bounds = "()") [1] "`\"a\"` at index 1 not in `(\"a\",Inf)`" 3/14 all-bw.R: all_bw(two.let, "a", Inf, bounds = "[)") [1] TRUE 3/14 all-bw.R: all_bw(two.let, "a", Inf, bounds = "(]") [1] "`\"a\"` at index 1 not in `(\"a\",Inf]`" 3/14 all-bw.R: all_bw(two.let, "a", Inf, bounds = "[]") [1] TRUE 3/14 all-bw.R: all_bw(two.let, "\t", Inf, bounds = "(]") [1] TRUE 3/14 all-bw.R: all_bw(two.let, -Inf, "zz", bounds = "()") [1] "`\"zz\"` at index 702 not in `(-Inf,\"zz\")`" 3/14 all-bw.R: all_bw(two.let, -Inf, "zz", bounds = "[)") [1] "`\"zz\"` at index 702 not in `[-Inf,\"zz\")`" 3/14 all-bw.R: all_bw(two.let, -Inf, "zz", bounds = "(]") [1] TRUE 3/14 all-bw.R: all_bw(two.let, -Inf, "zz", bounds = "[]") [1] TRUE 3/14 all-bw.R: two.let.inf[1] <- Inf 3/14 all-bw.R: two.let.inf[2] <- -Inf 3/14 all-bw.R: all_bw(two.let.inf, -Inf, Inf, bounds = "()") [1] TRUE 3/14 all-bw.R: all_bw(two.let.inf, -Inf, Inf, bounds = "[)") [1] TRUE 3/14 all-bw.R: all_bw(two.let.inf, -Inf, Inf, bounds = "(]") [1] TRUE 3/14 all-bw.R: all_bw(two.let.inf, -Inf, Inf, bounds = "[]") [1] TRUE 3/14 all-bw.R: two.let.na[50] <- NA_character_ 3/14 all-bw.R: all_bw(two.let.na, "a", "zz", bounds = "()") [1] "`\"a\"` at index 1 not in `(\"a\",\"zz\")`" 3/14 all-bw.R: all_bw(two.let.na, "a", "zz", bounds = "[)") [1] "`\"NA\"` at index 50 not in `[\"a\",\"zz\")`" 3/14 all-bw.R: all_bw(two.let.na, "a", "zz", bounds = "(]") [1] "`\"a\"` at index 1 not in `(\"a\",\"zz\"]`" 3/14 all-bw.R: all_bw(two.let.na, "a", "zz", bounds = "[]") [1] "`\"NA\"` at index 50 not in `[\"a\",\"zz\"]`" 3/14 all-bw.R: all_bw(two.let.na, -Inf, Inf, bounds = "[]") [1] "`\"NA\"` at index 50 not in `[-Inf,Inf]`" 3/14 all-bw.R: all_bw(two.let.na, "a", "zz", bounds = "()", na.rm = TRUE) [1] "`\"a\"` at index 1 not in `(\"a\",\"zz\")`" 3/14 all-bw.R: all_bw(two.let.na, "a", "zz", bounds = "[)", na.rm = TRUE) [1] "`\"zz\"` at index 702 not in `[\"a\",\"zz\")`" 3/14 all-bw.R: all_bw(two.let.na, "a", "zz", bounds = "(]", na.rm = TRUE) [1] "`\"a\"` at index 1 not in `(\"a\",\"zz\"]`" 3/14 all-bw.R: all_bw(two.let.na, "a", "zz", na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(two.let.na, "b", "zy", na.rm = TRUE) [1] "`\"a\"` at index 1 not in `[\"b\",\"zy\"]`" 3/14 all-bw.R: all_bw(two.let.na, -Inf, "zz", na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(two.let.na, -Inf, "zy", na.rm = TRUE) [1] "`\"zz\"` at index 702 not in `[-Inf,\"zy\"]`" 3/14 all-bw.R: all_bw(two.let.na, -Inf, "zy") [1] "`\"NA\"` at index 50 not in `[-Inf,\"zy\"]`" 3/14 all-bw.R: all_bw(two.let.na, -Inf, "zzz", bounds = "[)", na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(two.let.na, -Inf, "zz", bounds = "[)", na.rm = TRUE) [1] "`\"zz\"` at index 702 not in `[-Inf,\"zz\")`" 3/14 all-bw.R: all_bw(two.let.na, -Inf, "zz") [1] "`\"NA\"` at index 50 not in `[-Inf,\"zz\"]`" 3/14 all-bw.R: all_bw(two.let.na, "a", Inf, na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(two.let.na, "a", Inf) [1] "`\"NA\"` at index 50 not in `[\"a\",Inf]`" 3/14 all-bw.R: all_bw(two.let.na, "b", Inf, na.rm = TRUE) [1] "`\"a\"` at index 1 not in `[\"b\",Inf]`" 3/14 all-bw.R: all_bw(two.let.na, "\t", Inf, bounds = "(]", na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(two.let.na, "a", Inf, bounds = "(]", na.rm = TRUE) [1] "`\"a\"` at index 1 not in `(\"a\",Inf]`" 3/14 all-bw.R: all_bw(two.let.na, "a", Inf) [1] "`\"NA\"` at index 50 not in `[\"a\",Inf]`" 3/14 all-bw.R: utf8 <- list(s4 = ("𐀀"), e4 = ("􏿽"), s3 = ("ࠀ"), e3 = ("�"), 3/14 all-bw.R: for (i in seq_along(utf8)) Encoding(utf8[[i]]) <- "UTF-8" 3/14 all-bw.R: all_bw(lorem.ru.phrases, "\t", utf8$e2) [1] TRUE 3/14 all-bw.R: all_bw(lorem.cn.phrases, "\t", utf8$e3) [1] TRUE 4/14 classes.R: 4/14 classes.R: library(vetr) 4/14 classes.R: unitizer_sect("Class Matching", { 4/14 classes.R: obj2 <- structure(numeric()) 4/14 classes.R: obj1 <- structure(numeric(), class = "hello") 4/14 classes.R: alike(obj1, obj2) [1] "`obj2` should be class \"hello\" (is \"numeric\")" 4/14 classes.R: obj2 <- structure(numeric(), class = c(letters[10:12], letters[ 4/14 classes.R: obj1 <- structure(numeric(), class = letters[1:3]) 4/14 classes.R: alike(obj1, obj2) [1] "`class(obj2)[6]` should be \"a\" (is \"c\")" 4/14 classes.R: alike(obj2, obj1) [1] "`class(obj1)[1]` should be \"j\" (is \"a\")" 4/14 classes.R: obj2 <- structure(numeric(), class = c("b", "a", "c")) 4/14 classes.R: alike(obj1, obj2) [1] "`class(obj2)[1]` should be \"a\" (is \"b\")" 4/14 classes.R: obj2 <- structure(numeric(), class = c("a", "b", "x", "c")) 4/14 classes.R: alike(obj1, obj2) [1] "`class(obj2)[2]` should be \"a\" (is \"b\")" 4/14 classes.R: obj2 <- structure(numeric(), class = c("a", "b", "c")) 4/14 classes.R: alike(obj1, obj2) [1] TRUE 4/14 classes.R: obj2 <- structure(numeric(), class = c("x", "a", "b", "c")) 4/14 classes.R: alike(obj1, obj2) [1] TRUE 4/14 classes.R: alike(obj1, obj2, settings = vetr_settings(attr.mode = 1)) [1] "`length(class(obj2))` should be 3 (is 4)" 4/14 classes.R: unitizer_sect("S4", { 4/14 classes.R: x <- new("vetr_foo") 4/14 classes.R: y <- new("vetr_foo") 4/14 classes.R: z <- new("vetr_bar") 4/14 classes.R: v <- new("vetr_baz") 4/14 classes.R: w <- structure(list(a = character(), b = numeric()), class = "v 4/14 classes.R: alike(x, y) [1] TRUE 4/14 classes.R: alike(x, z) [1] "`z` should inherit from S4 class \"vetr_foo\" from pkg:vetr (is \"vetr_bar\" from pkg:vetr)" 4/14 classes.R: alike(x, w) [1] "`w` should be S4" 4/14 classes.R: alike(w, x) [1] "`x` should not be S4" 4/14 classes.R: alike(x, v) [1] TRUE 4/14 classes.R: alike(v, x) [1] "`x` should inherit from S4 class \"vetr_baz\" from pkg:vetr (is \"vetr_foo\" from pkg:vetr)" 4/14 classes.R: lst.2 <- list(list(11, 21), list(31, list(41, list(51, list(61) 4/14 classes.R: lst.5 <- lst.6 <- lst.2 4/14 classes.R: lst.5[[2]][[2]][[1]] <- x 4/14 classes.R: lst.6[[2]][[2]][[1]] <- v 4/14 classes.R: alike(lst.5, lst.6) [1] TRUE 4/14 classes.R: alike(lst.6, lst.5) [1] "`lst.5[[2]][[2]][[1]]` should inherit from S4 class \"vetr_baz\" from pkg:vetr (is \"vetr_foo\" from pkg:vetr)" 4/14 classes.R: v2 <- v 4/14 classes.R: class(v2) <- c("vetr_baz", "vetr_foo") Warning in class(v2) <- c("vetr_baz", "vetr_foo") : Setting class(x) to multiple strings ("vetr_baz", "vetr_foo", ...); result will no longer be an S4 object 4/14 classes.R: alike(x, v2) [1] "`v2` should be S4" 4/14 classes.R: inherits <- function(x, y) stop("pwned!!!") 4/14 classes.R: alike(y, v) [1] TRUE 4/14 classes.R: unitizer_sect("R5", { 4/14 classes.R: Foo.1 <- vetr:::Foo$new() 4/14 classes.R: Foo.2 <- vetr:::Foo$new() 4/14 classes.R: Bar.1 <- vetr:::Bar$new() 4/14 classes.R: alike(Foo.1, Foo.2) [1] TRUE 4/14 classes.R: alike(Foo.1, Bar.1) [1] "`Bar.1` should inherit from S4 class \"Foo\" from pkg:vetr (is \"Bar\" from pkg:vetr)" 4/14 classes.R: unitizer_sect("Non-Standard Class", { 4/14 classes.R: var.1 <- list(1, 2, 3) 4/14 classes.R: var.2 <- list("hello", list(1, 2, 3), 5) 4/14 classes.R: class(var.1) <- "marbles" 4/14 classes.R: class(var.2) <- "marbles" 4/14 classes.R: alike(var.1, var.2) [1] "`var.2[[1]]` should be type \"numeric\" (is \"character\")" 5/14 cstringr.R: 5/14 cstringr.R: library(vetr) 5/14 cstringr.R: unitizer_sect("Basic Tests", { 5/14 cstringr.R: vetr:::len_chr_len(1000L) [1] 4 5/14 cstringr.R: vetr:::len_chr_len(1L) [1] 1 5/14 cstringr.R: vetr:::len_chr_len(1234567890L) [1] 10 5/14 cstringr.R: len0 <- 1.23456789e+24 5/14 cstringr.R: vetr:::len_chr_len(len0) Error in vetr:::len_chr_len(len0) : Argument `maxlen` must be a positive scalar integer Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: vetr:::len_as_chr(1000L) [1] "1000" 5/14 cstringr.R: vetr:::len_as_chr(1L) [1] "1" 5/14 cstringr.R: vetr:::len_as_chr(1234567890L) [1] "1234567890" 5/14 cstringr.R: vetr:::len_as_chr(len0) Error in vetr:::len_as_chr(len0) : Argument `maxlen` must be a positive scalar integer Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: identical(vetr:::strmlen(lorem), nchar(lorem)) [1] TRUE 5/14 cstringr.R: vetr:::strmlen(lorem, 100L) Error in vetr:::strmlen(lorem, 100L) : Internal Error (CSR_strmlen): failed to find string terminator prior to maxlen 100 characters Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: identical(vetr:::strmcpy(lorem), lorem) [1] TRUE 5/14 cstringr.R: vetr:::strmcpy("") [1] "" 5/14 cstringr.R: vetr:::strmcpy(lorem, 20L) Warning in vetr:::strmcpy(lorem, 20L) : CSR_strmcpy: truncated string longer than 20 [1] "Lorem ipsum dolor si" 5/14 cstringr.R: identical(nchar(vetr:::strmcpy(lorem, 20L)), 20L) Warning in vetr:::strmcpy(lorem, 20L) : CSR_strmcpy: truncated string longer than 20 [1] TRUE 5/14 cstringr.R: vetr:::smprintf2("%s %s", lorem, lorem, 10L) Warning in vetr:::smprintf2("%s %s", lorem, lorem, 10L) : CSR_strmcpy: truncated string longer than 10 Warning in vetr:::smprintf2("%s %s", lorem, lorem, 10L) : CSR_strmcpy: truncated string longer than 10 [1] "Lorem ipsu Lorem ipsu" 5/14 cstringr.R: vetr:::smprintf2("%s %s hello world there", lorem, lorem, 10L) Error in vetr:::smprintf2("%s %s hello world there", lorem, lorem, 10L) : Internal Error: formatting string length longer that `nchar.max` contact maintainer., Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: (lorem) [1] "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." 5/14 cstringr.R: vetr:::ucfirst("hello WORLD") [1] "Hello WORLD" 5/14 cstringr.R: vetr:::lcfirst("HELLO world") [1] "hELLO world" 5/14 cstringr.R: vetr:::strbullet(c("hello world\nhow are things today", "once [1] "- hello world\n how are things today" [2] "- once upon a time\n lived a funny duck" 5/14 cstringr.R: vetr:::strbullet("hello\nblah\n", bullet = " - ", ctd = " [1] " - hello\n blah\n" 5/14 cstringr.R: vetr:::strbullet(1:10) Error in vetr:::strbullet(1:10) : First three arguments must be string Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: vetr:::collapse(letters[1:5]) [1] "abcde" 5/14 cstringr.R: vetr:::collapse(letters[1:5], sep = "\n") [1] "a\nb\nc\nd\ne" 5/14 cstringr.R: vetr:::collapse(character()) [1] "" 5/14 cstringr.R: unitizer_sect("numbers as character", { 5/14 cstringr.R: vetr:::num_as_chr(100) [1] "100" 5/14 cstringr.R: vetr:::num_as_chr(100.01) [1] "100.010000" 5/14 cstringr.R: num0 <- 1e+09 + 0.1 5/14 cstringr.R: num1 <- -1e+09 - 0.1 5/14 cstringr.R: sub("e[+-]?\\K0*", "", vetr:::num_as_chr(num0), perl = TRUE) [1] "1.000000e+9" 5/14 cstringr.R: sub("e[+-]?\\K0*", "", vetr:::num_as_chr(num1), perl = TRUE) [1] "-1.000000e+9" 5/14 cstringr.R: vetr:::num_as_chr(num0, as.int = TRUE) [1] "1000000000" 5/14 cstringr.R: vetr:::num_as_chr(num1, as.int = TRUE) [1] "-1000000000" 5/14 cstringr.R: num2 <- 1e+09 - 0.1 5/14 cstringr.R: num3 <- -(1e+09 - 0.1) 5/14 cstringr.R: vetr:::num_as_chr(num2) [1] "999999999.900000" 5/14 cstringr.R: vetr:::num_as_chr(num3) [1] "-999999999.900000" 5/14 cstringr.R: vetr:::num_as_chr(NA) [1] "NA" 5/14 cstringr.R: vetr:::num_as_chr(NaN) [1] "NaN" 5/14 cstringr.R: vetr:::num_as_chr(Inf) [1] "Inf" 5/14 cstringr.R: vetr:::num_as_chr(-Inf) [1] "-Inf" 5/14 cstringr.R: unitizer_sect("smprintf6", { 5/14 cstringr.R: vetr:::smprintf6("%s %s %s %s %s %s", "a", "bb", "ccc", "dddd" [1] "a bb ccc dddd eeeee ffffff" 5/14 cstringr.R: vetr:::smprintf6("%s %s %s %s %s %s", "a", "bb", "ccc", "dddd" Error in vetr:::smprintf6("%s %s %s %s %s %s", "a", "bb", "ccc", "dddd", : Internal Error: formatting string length longer that `nchar.max` contact maintainer., Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: vetr:::smprintf6("%s %s %s %s %s %s", "a", "bb", "ccc", "dddd" [1] "a bb ccc dddd eeeee ffffff" 5/14 cstringr.R: vetr:::smprintf6("%s %s %s %s", "a", "bb", "ccc", "dddd", "eee [1] "a bb ccc dddd" 5/14 cstringr.R: unitizer_sect("Corner Cases", { 5/14 cstringr.R: vetr:::strbullet(c("hello world"), maxlen = 5L) Error in vetr:::strbullet(c("hello world"), maxlen = 5L) : Exceeded `max_len` when trying to bullet `string` Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: vetr:::strbullet(c("hello world"), maxlen = 12L) Error in vetr:::strbullet(c("hello world"), maxlen = 12L) : Exceeded `max_len` when trying to bullet `string` (2) Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: vetr:::strbullet(c("hello world"), maxlen = 14L) [1] "- hello world" 5/14 cstringr.R: (vetr:::test_strmcpy()) Error in vetr:::test_strmcpy() : Argument `maxlen` must be at least one smaller than SIZE_MAX. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: vetr:::test_strappend() Error in vetr:::test_strappend() : Argument `maxlen` must be at least one smaller than max possible size_t value. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: vetr:::test_add_szt() Error in vetr:::test_add_szt() : size_t overflow: you tried to add two size_t numbers that together overflow size_t Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: vetr:::strmlen(list(), 100L) Error in vetr:::strmlen(list(), 100L) : Argument `str` must be a scalar character Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: (vetr:::test_smprintfx()) [1] "a b c d\na b c\na b\na\n" 5/14 cstringr.R: (vetr:::test_strappend2()) Warning in vetr:::test_strappend2() : CSR_strmcopy: truncated string longer than 5 NULL 5/14 cstringr.R: unitizer_sect("substr", { 5/14 cstringr.R: vetr:::strsub(lorem.phrases, 25L, TRUE) [1] "Lorem ipsum dolor sit a.." "consectetur adipiscing .." [3] "sed do eiusmod tempor i.." "Ut enim ad minim veniam," [5] "quis nostrud exercitati.." "Duis aute irure dolor i.." [7] "Excepteur sint occaecat.." "sunt in culpa qui offic.." 5/14 cstringr.R: vetr:::strsub(lorem.phrases, 25L, FALSE) [1] "Lorem ipsum dolor sit ame" "consectetur adipiscing el" [3] "sed do eiusmod tempor inc" "Ut enim ad minim veniam," [5] "quis nostrud exercitation" "Duis aute irure dolor in " [7] "Excepteur sint occaecat c" "sunt in culpa qui officia" 5/14 cstringr.R: vetr:::strsub(lorem.tr.phrases, 25L, TRUE) [1] "Bu tartışmalı tarihsel .." "Stalin'e düşman veya St.." [3] "Stalin karşıtlarının te.." "Hitlerle aralarındaki a.." [5] "Estonya," "Letonya," [7] "Litvanya," "Romanya ve Polonya'nin .." [9] "Stalin'in doğru yaptığı.." "1937'deki Münih görüşme.." [11] "İngiliz ve Fransız empe.." "Nazileri kışkırtıyorlar.." [13] "Bu amaçla Avusturya'nın.." "özellikle Çekoslovakya'.." [15] "Böylece Sovyetler Birli.." "kendi sınırlarını güven.." [17] "Stalin'in amaçlarına gö.." "Polonya ve Baltık ülkel.." [19] "Nazilerin Sovyetler Bir.." "Böylece 1939 yılında Na.." [21] "Litvanya ve Letonya'yı .." "Finlandiya'ya saldırdı .." [23] "1941'de Hitler'in Sovye.." "II." [25] "Dünya Savaşı'nın en ağı.." 5/14 cstringr.R: vetr:::strsub(lorem.tr.phrases, 25L, FALSE) [1] "Bu tartışmalı tarihsel dö" "Stalin'e düşman veya Stal" [3] "Stalin karşıtlarının tezl" "Hitlerle aralarındaki açı" [5] "Estonya," "Letonya," [7] "Litvanya," "Romanya ve Polonya'nin Na" [9] "Stalin'in doğru yaptığını" "1937'deki Münih görüşmele" [11] "İngiliz ve Fransız empery" "Nazileri kışkırtıyorlardı" [13] "Bu amaçla Avusturya'nın A" "özellikle Çekoslovakya'nı" [15] "Böylece Sovyetler Birliği" "kendi sınırlarını güvence" [17] "Stalin'in amaçlarına göre" "Polonya ve Baltık ülkeler" [19] "Nazilerin Sovyetler Birli" "Böylece 1939 yılında Nazi" [21] "Litvanya ve Letonya'yı sı" "Finlandiya'ya saldırdı ve" [23] "1941'de Hitler'in Sovyetl" "II." [25] "Dünya Savaşı'nın en ağır " 5/14 cstringr.R: vetr:::strsub(lorem.ru.phrases, 25L, TRUE) [1] "Родился 6 (18) декабря .." "Позже она подтверждалас.." [3] "хотя начиная с 1929 год.." "Был третьим сыном в сем.." [5] "первые двое умерли в мл.." "Его родным языком был г.." [7] "русский язык Сталин выу.." "но всегда говорил с зам.." [9] "Согласно утверждениям д.." "Сталин," [11] "однако," "пел по-русски практичес.." 5/14 cstringr.R: vetr:::strsub(lorem.ru.phrases, 25L, FALSE) [1] "Родился 6 (18) декабря 18" "Позже она подтверждалась " [3] "хотя начиная с 1929 года[" "Был третьим сыном в семье" [5] "первые двое умерли в млад" "Его родным языком был гру" [7] "русский язык Сталин выучи" "но всегда говорил с замет" [9] "Согласно утверждениям доч" "Сталин," [11] "однако," "пел по-русски практически" 5/14 cstringr.R: vetr:::strsub(lorem.cn.phrases, 25L, TRUE) [1] "中華人民共和國是單一制的多民族國家。" [2] "全國劃分為23個省(其中台灣省并沒有實際管辖)、" [3] "5個自治區、" [4] "4個直轄市和2個根據一國兩制設立的特別行政區,.." [5] "中华人民共和国跨越五个地理时区,但全国均使用北.." [6] "中華人民共和國官方認定的民族現有56個,其中最.." [7] "维吾尔族、" [8] "滿族、" [9] "蒙古族、" [10] "藏族、" [11] "朝鲜族等也多使用自己的語言與文字。" [12] "主要宗教有佛教、" [13] "道教、" [14] "基督教(多指新教)、" [15] "天主教和伊斯兰教等,但過半人口無特定宗教信仰。" [16] "中华人民共和国的通用语言是汉语普通話,當中在中.." 5/14 cstringr.R: vetr:::strsub(lorem.cn.phrases, 25L, FALSE) [1] "中華人民共和國是單一制的多民族國家。" [2] "全國劃分為23個省(其中台灣省并沒有實際管辖)、" [3] "5個自治區、" [4] "4個直轄市和2個根據一國兩制設立的特別行政區,均直" [5] "中华人民共和国跨越五个地理时区,但全国均使用北京时" [6] "中華人民共和國官方認定的民族現有56個,其中最大民" [7] "维吾尔族、" [8] "滿族、" [9] "蒙古族、" [10] "藏族、" [11] "朝鲜族等也多使用自己的語言與文字。" [12] "主要宗教有佛教、" [13] "道教、" [14] "基督教(多指新教)、" [15] "天主教和伊斯兰教等,但過半人口無特定宗教信仰。" [16] "中华人民共和国的通用语言是汉语普通話,當中在中國大" 5/14 cstringr.R: vetr:::strsub(lorem.phrases, 1:2, TRUE) Error in vetr:::strsub(lorem.phrases, 1:2, TRUE) : Argument `chars` must be scalar integer, strictly positive, and not NA. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: vetr:::strsub(lorem.phrases, 25L, 1:2) Error in vetr:::strsub(lorem.phrases, 25L, 1:2) : Argument `mark_trunc` must be a TRUE or FALSE. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: vetr:::strsub(1:2, 25L, TRUE) Error in vetr:::strsub(1:2, 25L, TRUE) : Argument `string` must be a string. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: vetr:::strsub(lorem.phrases, 2L, TRUE) Error in vetr:::strsub(lorem.phrases, 2L, TRUE) : Argument `chars` must be greater than 2 when `mark_trunc` is TRUE. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: vetr:::strsub(lorem.phrases, 3L, TRUE) [1] "L.." "c.." "s.." "U.." "q.." "D.." "E.." "s.." 5/14 cstringr.R: unitizer_sect("nchar_u", { 5/14 cstringr.R: vetr:::nchar_u(1:10) Error in vetr:::nchar_u(1:10) : Argument `string` must be a character vector. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: vetr:::nchar_u(c("a", "ab", "abc")) [1] 1 2 3 5/14 cstringr.R: unitizer_sect("char_offsets", { 5/14 cstringr.R: vetr:::char_offsets(1:10) Error in vetr:::char_offsets(1:10) : Argument `string` must be a character vector. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: vetr:::char_offsets(c("a", "ab", "abc")) Error in vetr:::char_offsets(c("a", "ab", "abc")) : Argument `string` must be scalar. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: unitizer_sect("UTF8 corner cases, in UTF-8", { 5/14 cstringr.R: utf8.kuhn <- readLines("unitizer/helper/UTF-8-test.txt", encod Warning in readLines("unitizer/helper/UTF-8-test.txt", encoding = "UTF-8") : line 91 appears to contain an embedded nul 5/14 cstringr.R: test.start <- grep("^Here come the tests:", utf8.kuhn, useByte 5/14 cstringr.R: test.start [1] 81 5/14 cstringr.R: utf8.test <- tail(utf8.kuhn, -test.start) 5/14 cstringr.R: nchar.base <- nchar(utf8.test, allowNA = TRUE) 5/14 cstringr.R: untranslatable <- is.na(nchar.base) 5/14 cstringr.R: nchar.vetr <- vetr:::nchar_u(utf8.test) 5/14 cstringr.R: base.vetr.diff <- !is.na(nchar.base) & nchar.vetr != nchar.bas 5/14 cstringr.R: source("unitizer/helper/UTF-8-unicode-10-ex.R", local = TRUE) 5/14 cstringr.R: vetr:::nchar_u(unicode.10[1]) [1] 3 5/14 cstringr.R: vetr:::nchar_u(unicode.10[2]) [1] 2 5/14 cstringr.R: vetr:::nchar_u(unicode.10[3]) [1] 3 5/14 cstringr.R: vetr:::nchar_u(unicode.10[4]) [1] 10 5/14 cstringr.R: vetr:::char_offsets(unicode.10[4]) [1] 1 -3 -2 -1 1 -1 1 -1 -1 1 5/14 cstringr.R: source("unitizer/helper/UTF-8-critical.R", local = TRUE) 5/14 cstringr.R: Map(vetr:::char_offsets, crit.1) $n.0 [1] 1 $y.1 [1] -1 5/14 cstringr.R: Map(vetr:::char_offsets, crit.2) $n.0 [1] -1 -1 $n.1 [1] -1 1 $y.2 [1] 2 $y.3 [1] 2 $n.4 [1] -1 -1 5/14 cstringr.R: Map(vetr:::char_offsets, crit.3) $n.00 [1] -1 -1 -1 $n.01 [1] -2 1 $y.02 [1] 3 $y.03 [1] 3 $n.04 [1] -2 -1 $n.05 [1] -1 1 -1 $y.06 [1] 3 $y.07 [1] 3 $n.08 [1] -2 -1 $n.10 [1] -1 -1 -1 $n.11 [1] -1 1 -1 $n.12 [1] -2 1 $y.13 [1] 3 $y.14 [1] 3 $n.16 [1] -2 -1 $n.17 [1] -1 -1 -1 $n.18 [1] -2 1 $n.19 [1] -1 1 -1 $y.20 [1] 3 $y.21 [1] 3 $n.22 [1] -2 -1 $n.23 [1] -1 -1 -1 5/14 cstringr.R: Map(vetr:::char_offsets, crit.4) $n.00 [1] -1 -1 -1 -1 $n.01 [1] -2 1 -1 $n.02 [1] -3 1 $y.03 [1] 4 $y.04 [1] 4 $n.06 [1] -3 -1 $n.07 [1] -2 -1 -1 $n.08 [1] -1 -1 -1 -1 $n.09 [1] -3 1 $n.10 [1] -2 1 -1 $n.11 [1] -1 1 -1 -1 $y.12 [1] 4 $y.13 [1] 4 $n.14 [1] -3 -1 $n.15 [1] -2 -1 -1 $n.16 [1] -1 -1 -1 -1 $n.17 [1] -3 1 $n.18 [1] -2 1 -1 $n.19 [1] -1 1 -1 -1 $y.20 [1] 4 $y.21 [1] 4 $n.22 [1] -3 -1 $n.23 [1] -2 -1 -1 $n.24 [1] -1 -1 1 1 $n.25 [1] -1 -1 -1 -1 5/14 cstringr.R: unitizer_sect("UTF-8 corner cases - other encodings", { 5/14 cstringr.R: source("unitizer/helper/latin-1.R", local = TRUE) 5/14 cstringr.R: lapply(lat.1.1, vetr:::char_offsets) [[1]] [1] 1 1 2 1 [[2]] [1] 1 1 1 1 1 [[3]] [1] 2 1 2 1 2 1 2 1 2 5/14 cstringr.R: lapply(lat.1.2, vetr:::char_offsets) [[1]] [1] 1 1 1 1 [[2]] [1] 1 1 1 1 1 [[3]] [1] 1 1 1 1 1 1 1 1 1 5/14 cstringr.R: vetr:::strsub(lat.1.1, 3L, mark = FALSE) [1] "niñ" "hel" "µ ¶" 5/14 cstringr.R: vetr:::strsub(lat.1.2, 3L, mark = FALSE) [1] "ni\\xf1" "hel" "\\xb5 \\xb6" 6/14 eval.R: 6/14 eval.R: library(vetr) 6/14 eval.R: unitizer_sect("evaluate", { 6/14 eval.R: vetr:::eval_check(quote(logical(2L)), quote(xyz), 1:2) [[1]] [1] "`xyz`" "be" "type \"logical\"" "is" [5] "\"integer\"" 6/14 eval.R: vetr:::eval_check(quote(logical(2L)), quote(xyz), c(TRUE, FALSE)) list() 6/14 eval.R: vetr:::eval_check(quote(logical(2L)), quote(xyz), c(TRUE, FALSE, [[1]] [1] "`length(xyz)`" "be" "2" "is" [5] "3" 6/14 eval.R: vetr:::eval_check(quote(logical(2L) || NULL), quote(xyz), 1:2) [[1]] [1] "`xyz`" "be" "type \"logical\"" "is" [5] "\"integer\"" [[2]] [1] "`xyz`" "be" "`NULL`" "is" "\"integer\"" 6/14 eval.R: vetr:::eval_check(quote(logical(2L) || NULL), quote(xyz), NULL) list() 6/14 eval.R: vetr:::eval_check(quote(logical(2L) || NULL), quote(xyz), c(TRUE, list() 6/14 eval.R: vetr:::eval_check(quote(matrix(integer(), nrow = 3) || NULL), list() 6/14 eval.R: vetr:::eval_check(quote(matrix(integer(), nrow = 3) || NULL), [[1]] [1] "`xyz`" "be" "\"matrix\"" "is" "\"integer\"" [[2]] [1] "`xyz`" "be" "`NULL`" "is" "\"integer\"" 6/14 eval.R: vetr:::eval_check(quote(matrix(integer(), nrow = 3) || vector("lis [[1]] [1] "`xyz`" "be" "\"matrix\"" "is" "\"list\"" [[2]] [1] "`length(xyz)`" "be" "2" "is" [5] "1" 6/14 eval.R: vetr:::eval_check(quote(matrix(integer(), nrow = 3) || vector("lis list() 6/14 eval.R: vetr:::eval_check(quote(matrix(integer(), nrow = 3) || list(charac [[1]] [1] "`xyz`" "be" "\"matrix\"" "is" "\"list\"" [[2]] [1] "`xyz[[2]]`" "be" "type \"integer-like\"" [4] "is" "\"character\"" 6/14 eval.R: unitizer_sect("evaluate with sub", { 6/14 eval.R: xyz <- c(TRUE, TRUE) 6/14 eval.R: vetr:::eval_check(quote(logical(2L) && .(all(xyz))), quote(xyz), Error in vetr:::eval_check(quote(logical(2L) && .(all(xyz))), quote(xyz), : vet/vetr usage error: found symbol `xyz` in vetting token for object with the same symbol. Please use `.` to reference the object being checked by the vetting token (e.g. use `vet(. > 0, x)` instead of `vet(x > 0, x)`) Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 6/14 eval.R: vetr:::eval_check(quote(logical(2L) && .(all(.))), quote(xyz), list() 6/14 eval.R: vetr:::eval_check(quote(logical(2L) && .(!any(is.na(.)))), quote(x list() 6/14 eval.R: xyz <- c(TRUE, NA) 6/14 eval.R: vetr:::eval_check(quote(logical(2L) && .(!any(is.na(.)))), quote(x [[1]] [1] "`!any(is.na(xyz))` is not TRUE (FALSE)" 6/14 eval.R: xyz <- c(TRUE, FALSE, TRUE) 6/14 eval.R: vetr:::eval_check(quote(logical(2L) && .(!any(is.na(.)))), quote(x [[1]] [1] "`length(xyz)`" "be" "2" "is" [5] "3" 6/14 eval.R: abc1 <- letters[1:5] 6/14 eval.R: vetr:::eval_check(quote(character(5L) && .(all(. %in% letters[1:3] [[1]] [1] "`all(abc1 %in% letters[1:3])` is not TRUE (FALSE)" 6/14 eval.R: abc2 <- rep("a", 5) 6/14 eval.R: vetr:::eval_check(quote(character(5L) && .(all(. %in% letters[1:3] list() 6/14 eval.R: mat1 <- matrix(1:30, ncol = 3) 6/14 eval.R: vetr:::eval_check(quote((matrix(numeric(), ncol = 3) || matrix(int list() 6/14 eval.R: mat2 <- matrix(1:120, ncol = 3) 6/14 eval.R: vetr:::eval_check(quote((matrix(numeric(), ncol = 3) || matrix(int [[1]] [1] "`length(mat2) < 100` is not TRUE (FALSE)" 6/14 eval.R: mat3 <- LETTERS[1:9] 6/14 eval.R: vetr:::eval_check(quote((matrix(numeric(), ncol = 3) || matrix(int [[1]] [1] "`mat3`" "be" "\"matrix\"" "is" [5] "\"character\"" [[2]] [1] "`mat3`" "be" "\"matrix\"" "is" [5] "\"character\"" [[3]] [1] "`length(mat3)`" "be" "10" "is" [5] "9" 6/14 eval.R: vetr:::eval_check(quote(matrix(numeric(), ncol = 3) || matrix(inte [[1]] [1] "`mat3`" "be" "\"matrix\"" "is" [5] "\"character\"" [[2]] [1] "`mat3`" "be" "\"matrix\"" "is" [5] "\"character\"" [[3]] [1] "`length(mat3)`" "be" "10" "is" [5] "9" [[4]] [1] "`length(mat3) > 20` is not TRUE (FALSE)" 6/14 eval.R: unitizer_sect("custom expressions", { 6/14 eval.R: x <- -1:1 6/14 eval.R: y <- 1 6/14 eval.R: z <- -1 6/14 eval.R: w <- NA_integer_ 6/14 eval.R: u <- integer() 6/14 eval.R: t <- 1:3 6/14 eval.R: vetr:::eval_check(quote(. > 0), quote(x), x) [[1]] [1] "`x > 0` is not all TRUE (contains non-TRUE values)" 6/14 eval.R: vetr:::eval_check(quote(. > 0), quote(y), y) list() 6/14 eval.R: vetr:::eval_check(quote(. > 0), quote(z), z) [[1]] [1] "`z > 0` is not TRUE (FALSE)" 6/14 eval.R: vetr:::eval_check(quote(. > 0), quote(t), t) list() 6/14 eval.R: vetr:::eval_check(quote(. > 0), quote(w), w) [[1]] [1] "`w > 0` is not TRUE (NA)" 6/14 eval.R: vetr:::eval_check(quote(. > 0), quote(u), u) list() 6/14 eval.R: unitizer_sect("Errors", { 6/14 eval.R: vetr:::eval_check(1:3, 1:3, TRUE, env = list(1:3)) Error in vetr:::eval_check(1:3, 1:3, TRUE, env = list(1:3)) : `vet/vetr` usage error: argument `env` must be an environment. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 6/14 eval.R: vetr:::eval_check(quote(y), quote(x), TRUE, env = list(1:3)) Error in vetr:::eval_check(quote(y), quote(x), TRUE, env = list(1:3)) : `vet/vetr` usage error: argument `env` must be an environment. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 7/14 internal.R: 7/14 internal.R: library(vetr) 7/14 internal.R: unitizer_sect("Name like attributes", { 7/14 internal.R: vetr:::name_compare(c("", "hello"), c("abc", "hello")) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::name_compare(c("ab", "hello"), c("abc", "hello")) $success [1] 0 $message $message$message [1] "be" "\"ab\"" "is" "\"abc\"" $message$wrap $message$wrap[[1]] NULL[1] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $message$wrap[[2]][[2]] [1] 1 $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::name_compare(c(NA_character_, "hello"), c("abc", "hello $success [1] 0 $message $message$message [1] "be" "\"NA\"" "is" "\"abc\"" $message$wrap $message$wrap[[1]] NULL[1] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $message$wrap[[2]][[2]] [1] 1 $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::name_compare(c("ab", "hello"), c(NA_character_, "hello" $success [1] 0 $message $message$message [1] "be" "\"ab\"" "is" "\"NA\"" $message$wrap $message$wrap[[1]] NULL[1] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $message$wrap[[2]][[2]] [1] 1 $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::name_compare(c(NA_character_, "hello"), c(NA_character_ $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::name_compare(1:3, 3:1) $success [1] 0 $message $message$message [1] "be" "identical to target" "" [4] "" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: unitizer_sect("S3 Classes", { 7/14 internal.R: class1 <- letters[1:5] 7/14 internal.R: class2 <- letters[3:5] 7/14 internal.R: class3 <- letters[c(4, 3, 5)] 7/14 internal.R: class4 <- character() 7/14 internal.R: class5 <- NULL 7/14 internal.R: class6 <- list("a", "b", "c") 7/14 internal.R: vetr:::class_compare(class2, class1, 0) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::class_compare(class1, class2, 0) $success [1] 0 $message $message$message [1] "be" "\"a\"" "is" "\"c\"" $message$wrap $message$wrap[[1]] class(NULL)[1] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::class_compare(class1, class1[1:3], 0) $success [1] 0 $message $message$message [1] "inherit" "from class \"d\"" "" "" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::class_compare(class3, class2, 0) $success [1] 0 $message $message$message [1] "be" "\"d\"" "is" "\"c\"" $message$wrap $message$wrap[[1]] class(NULL)[1] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::class_compare(class3, class1, 0) $success [1] 0 $message $message$message [1] "be" "\"d\"" "is" "\"c\"" $message$wrap $message$wrap[[1]] class(NULL)[3] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::class_compare(class5, class2, 0) $success [1] 0 $message $message$message [1] "be" [2] "`alike` the corresponding element in target" [3] "" [4] "" $message$wrap $message$wrap[[1]] class(NULL) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::class_compare(class2, class5, 0) $success [1] 0 $message $message$message [1] "be" [2] "`alike` the corresponding element in target" [3] "" [4] "" $message$wrap $message$wrap[[1]] class(NULL) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::class_compare(class5, class5, 0) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::class_compare(class6, class2, 0) $success [1] 0 $message $message$message [1] "be" [2] "`alike` the corresponding element in target" [3] "" [4] "" $message$wrap $message$wrap[[1]] class(NULL) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::class_compare(class2, class6, 0) $success [1] 0 $message $message$message [1] "be" [2] "`alike` the corresponding element in target" [3] "" [4] "" $message$wrap $message$wrap[[1]] class(NULL) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: class7 <- c("a", "data.frame") 7/14 internal.R: vetr:::class_compare(class7, class1, 0) $success [1] 0 $message $message$message [1] "be" "\"a\"" "is" "\"d\"" $message$wrap $message$wrap[[1]] class(NULL)[4] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 1 $lvl [1] 0 7/14 internal.R: vetr:::class_compare(class1, class7, 0) $success [1] 0 $message $message$message [1] "be" "\"b\"" "is" "\"data.frame\"" $message$wrap $message$wrap[[1]] class(NULL)[2] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: unitizer_sect("Dimnames", { 7/14 internal.R: dimn1 <- list(NULL, NULL, NULL) 7/14 internal.R: dimn2 <- list(a = letters[1:3], b = letters[4:6], c = letters[ 7/14 internal.R: dimn3 <- list(letters[1:3], b = letters[4:6], c = letters[7:9] 7/14 internal.R: dimn4 <- list(letters[1:3], B = letters[4:6], C = letters[7:9] 7/14 internal.R: dimn5 <- list(a = LETTERS[1:3], b = letters[4:6], c = letters[ 7/14 internal.R: dimn6 <- list(a = "", b = letters[4:6], c = letters[7:9]) 7/14 internal.R: dimn7 <- list() 7/14 internal.R: dimn8 <- list(a = LETTERS[1:3], b = letters[4:6], c = letters[ 7/14 internal.R: dimn9 <- list(a = 1:3, b = letters[4:6], c = letters[7:9]) 7/14 internal.R: dimn10 <- list(a = list("a", "b", "c"), b = letters[4:6], c = 7/14 internal.R: dimn11 <- NULL 7/14 internal.R: dimn12 <- matrix(letters[1:9], nrow = 3) 7/14 internal.R: dimn13 <- `attr<-`(dimn2, "bar", "yowza") 7/14 internal.R: dimn14 <- `attr<-`(dimn2, "bar", "yowz") 7/14 internal.R: dimn15 <- list(a = letters[1:3], b = letters[1:3]) 7/14 internal.R: dimn16 <- list(a = letters[1:3], b = letters[1:3]) 7/14 internal.R: attr(dimn15, "a") <- 1:2 7/14 internal.R: attr(dimn16, "a") <- 1:3 7/14 internal.R: dimn17 <- list(a = letters[1:3]) 7/14 internal.R: dimn18 <- list(a = letters[1:2], b = letters[1:3]) 7/14 internal.R: vetr:::dimname_compare(dimn3, dimn2) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn2, dimn3) $success [1] 0 $message $message$message [1] "be" "\"a\"" "is" "\"\"" $message$wrap $message$wrap[[1]] names(dimnames(NULL))[1] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn3, dimn4) $success [1] 0 $message $message$message [1] "be" "\"b\"" "is" "\"B\"" $message$wrap $message$wrap[[1]] names(dimnames(NULL))[2] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn2, dimn5) $success [1] 0 $message $message$message [1] "be" "\"a\"" "is" "\"A\"" $message$wrap $message$wrap[[1]] dimnames(NULL)[[1]][1] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn6, dimn5) $success [1] 0 $message $message$message [1] "be" "1" "is" "3" $message$wrap $message$wrap[[1]] length(dimnames(NULL)[[1]]) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn5, dimn6) $success [1] 0 $message $message$message [1] "be" "3" "is" "1" $message$wrap $message$wrap[[1]] length(dimnames(NULL)[[1]]) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn2, dimn1) $success [1] 0 $message $message$message [1] "have" "attribute \"names\"" "" [4] "" $message$wrap $message$wrap[[1]] dimnames(NULL) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn1, dimn2) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn11, dimn2) $success [1] 0 $message $message$message [1] "be" "`NULL`" "is" "\"list\"" $message$wrap $message$wrap[[1]] dimnames(NULL) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn11, dimn11) $success [1] 0 $message $message$message [1] "have" "a \"dimnames\" attribute" [3] "" "" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn7, dimn2) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn2, dimn7) $success [1] 0 $message $message$message [1] "be" "3" "is" "0" $message$wrap $message$wrap[[1]] length(dimnames(NULL)) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn7, dimn7) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn5, dimn8) $success [1] 0 $message $message$message [1] "be" "3" "is" "4" $message$wrap $message$wrap[[1]] length(dimnames(NULL)) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn8, dimn5) $success [1] 0 $message $message$message [1] "be" "4" "is" "3" $message$wrap $message$wrap[[1]] length(dimnames(NULL)) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn9, dimn2) $success [1] 0 $message $message$message [1] "be" "type \"integer-like\"" "is" [4] "\"character\"" $message$wrap $message$wrap[[1]] dimnames(NULL)[[1]] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn2, dimn9) $success [1] 0 $message $message$message [1] "be" "type \"character\"" "is" [4] "\"integer\"" $message$wrap $message$wrap[[1]] dimnames(NULL)[[1]] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn2, dimn12) $success [1] 0 $message $message$message [1] "be" "type \"list\"" "is" "\"character\"" $message$wrap $message$wrap[[1]] dimnames(NULL) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn12, dimn12) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn2, dimn13) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn13, dimn2) $success [1] 0 $message $message$message [1] "not be" "missing" "" "" $message$wrap $message$wrap[[1]] attr(dimnames(NULL), "bar") $message$wrap[[2]] $message$wrap[[2]][[1]] [1] "bar" $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn13, dimn14) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn14, dimn13) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn15, dimn16) $success [1] 0 $message $message$message [1] "be" "2" "is" "3" $message$wrap $message$wrap[[1]] length(attr(dimnames(NULL), "a")) $message$wrap[[2]] $message$wrap[[2]][[1]] [1] "a" $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn17, dimn18) $success [1] 0 $message $message$message [1] "be" "1" "is" "2" $message$wrap $message$wrap[[1]] length(dimnames(NULL)) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: unitizer_sect("Dims", { 7/14 internal.R: dim1 <- rep(2L, 2) 7/14 internal.R: dim2 <- rep(2L, 3) 7/14 internal.R: dim3 <- rep(2L, 4) 7/14 internal.R: dim4 <- c(1L, 1L) 7/14 internal.R: dim5 <- 2L 7/14 internal.R: dim6 <- c(1L, 2L, 3L) 7/14 internal.R: dim7 <- rep(0L, 2) 7/14 internal.R: dim8 <- c(0L, 0L, 2L) 7/14 internal.R: dim9 <- NULL 7/14 internal.R: dim10 <- letters[1:2] 7/14 internal.R: dim11 <- list(2L, 2L) 7/14 internal.R: vetr:::dim_compare(dim1, dim2) $success [1] 0 $message $message$message [1] "be" "\"matrix\"" "is" "\"array\"" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 1 7/14 internal.R: vetr:::dim_compare(dim2, dim3) $success [1] 0 $message $message$message [1] "have" "3 dimensions" "has" "4" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dim_compare(dim1, dim4) $success [1] 0 $message $message$message [1] "have" "2 rows" "has" "1" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dim_compare(dim2, dim6) $success [1] 0 $message $message$message [1] "have" "size 2 at dimension 1" "has" [4] "1" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dim_compare(dim7, dim1) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dim_compare(dim7, dim4) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dim_compare(dim1, dim7) $success [1] 0 $message $message$message [1] "have" "2 rows" "has" "0" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dim_compare(dim7, dim2) $success [1] 0 $message $message$message [1] "be" "\"matrix\"" "is" "\"array\"" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 1 7/14 internal.R: vetr:::dim_compare(dim8, dim2) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dim_compare(dim8, dim6) $success [1] 0 $message $message$message [1] "have" "size 2 at dimension 3" "has" [4] "3" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dim_compare(dim6, dim9) $success [1] 0 $message $message$message [1] "be" "\"array\"" "is" "\"integer\"" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 1 7/14 internal.R: vetr:::dim_compare(9L, NULL) $success [1] 0 $message $message$message [1] "have" "a \"dim\" attribute" "" [4] "" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dim_compare(dim1, dim2, list()) $success [1] 0 $message $message$message [1] "be" "\"list\"" "is" "\"integer\"" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 1 7/14 internal.R: vetr:::dim_compare(dim1, dim2, cur_obj = list()) $success [1] 0 $message $message$message [1] "be" "\"integer\"" "is" "\"list\"" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 1 7/14 internal.R: vetr:::dim_compare(dim1, dim2, list(), list()) $success [1] 0 $message $message$message [1] "have" "2 dimensions" "has" "3" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dim_compare(dim1, dim2, integer(), list()) $success [1] 0 $message $message$message [1] "be" "\"integer\"" "is" "\"list\"" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 1 7/14 internal.R: vetr:::dim_compare(dim9, dim6) $success [1] 0 $message $message$message [1] "be" "\"integer\"" "is" "\"array\"" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 1 7/14 internal.R: vetr:::dim_compare(dim10, dim1) $success [1] 0 $message $message$message [1] "be" [2] "`alike` the corresponding element in target" [3] "" [4] "" $message$wrap $message$wrap[[1]] dim(NULL) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: unitizer_sect("Time Series", { 7/14 internal.R: ts.1 <- attr(ts(runif(24), 1970, frequency = 12), "tsp") 7/14 internal.R: ts.2 <- attr(ts(runif(24), 1970, frequency = 4), "tsp") 7/14 internal.R: ts.3 <- ts.4 <- ts.1 7/14 internal.R: ts.3[[2L]] <- 0 7/14 internal.R: ts.4[[3L]] <- 0 7/14 internal.R: vetr:::ts_compare(ts.1, ts.2) $success [1] 0 $message $message$message [1] "be" "1971.92" "is" "1975.75" $message$wrap $message$wrap[[1]] tsp(NULL)[2] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::ts_compare(ts.3, ts.2) $success [1] 0 $message $message$message [1] "be" "12" "is" "4" $message$wrap $message$wrap[[1]] tsp(NULL)[3] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::ts_compare(ts.4, ts.2) $success [1] 0 $message $message$message [1] "be" "1971.92" "is" "1975.75" $message$wrap $message$wrap[[1]] tsp(NULL)[2] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::ts_compare(ts.4, ts.1) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::ts_compare(ts.1, ts.4) $success [1] 0 $message $message$message [1] "be" "12" "is" "0" $message$wrap $message$wrap[[1]] tsp(NULL)[3] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::ts_compare(ts.4, "hello") $success [1] 0 $message $message$message [1] "be" [2] "`alike` the corresponding element in target" [3] "" [4] "" $message$wrap $message$wrap[[1]] tsp(NULL) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::ts_compare("hello", 1:3) $success [1] 0 $message $message$message [1] "be" [2] "`alike` the corresponding element in target" [3] "" [4] "" $message$wrap $message$wrap[[1]] tsp(NULL) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::ts_compare(ts.1, 1:3) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::ts_compare(ts.4, 1:4) $success [1] 0 $message $message$message [1] "be" [2] "`alike` the corresponding element in target" [3] "" [4] "" $message$wrap $message$wrap[[1]] tsp(NULL) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: unitizer_sect("All Attributes, default", { 7/14 internal.R: vetr:::attr_compare(1, 1) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(matrix(integer(), 3), matrix(integer(), 3, $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(matrix(integer(), 3), matrix(integer(), 3, Error in vetr:::attr_compare(matrix(integer(), 3), matrix(integer(), 3, : Argument `mode` must be a one length integer like vector Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 7/14 internal.R: vetr:::attr_compare(matrix(integer(), 3), matrix(integer(), 3, $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(matrix(integer(), 4), matrix(integer(), 3, $success [1] 0 $message $message$message [1] "have" "4 rows" "has" "3" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 2 7/14 internal.R: vetr:::attr_compare(matrix(integer(), ncol = 4), matrix(intege $success [1] 0 $message $message$message [1] "have" "4 columns" "has" "3" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 2 7/14 internal.R: vetr:::attr_compare(matrix(integer(), 3, 3, dimnames = list(NU $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(matrix(integer(), 3, 3, dimnames = list(NU $success [1] 0 $message $message$message [1] "be" "\"b\"" "is" "\"a\"" $message$wrap $message$wrap[[1]] colnames(NULL)[1] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 5 7/14 internal.R: vetr:::attr_compare(matrix(integer(), 3, 3, dimnames = list(le $success [1] 0 $message $message$message [1] "be" "\"a\"" "is" "\"A\"" $message$wrap $message$wrap[[1]] row.names(NULL)[1] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 5 7/14 internal.R: vetr:::attr_compare(matrix(integer(), 3, 3, dimnames = list(LE $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(matrix(integer(), 3, 3, dimnames = list(A $success [1] 0 $message $message$message [1] "be" "\"A\"" "is" "\"a\"" $message$wrap $message$wrap[[1]] names(dimnames(NULL))[1] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 5 7/14 internal.R: vetr:::attr_compare(structure(list(integer(), character())), $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(structure(list(integer(), character()), cl $success [1] 1 $message NULL $df [1] 1 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(structure(unname(data.frame(integer(), cha $success [1] 1 $message NULL $df [1] 1 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(structure(list(), welp = list()), structur $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(structure(list(), welp = list(NULL)), stru $success [1] 0 $message $message$message [1] "be" "1" "is" "2" $message$wrap $message$wrap[[1]] length(attr(NULL, "welp")) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $message$wrap[[2]][[2]] [1] "welp" $df [1] 0 $lvl [1] 6 7/14 internal.R: vetr:::attr_compare(structure(list(), welp = list(), belp = 1: $success [1] 0 $message $message$message [1] "have" "attribute \"belp\"" "" [4] "" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 7 7/14 internal.R: vetr:::attr_compare(structure(list(), class = letters[1:3]), $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(structure(list(), class = letters[1:3]), $success [1] 0 $message $message$message [1] "be" "\"a\"" "is" "\"b\"" $message$wrap $message$wrap[[1]] class(NULL)[2] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(structure(list(), class = letters[2:4]), $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: unitizer_sect("All attributes, strict", { 7/14 internal.R: vetr:::attr_compare(matrix(integer(), 3), matrix(integer(), 3, $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(matrix(integer(), 3, 3), matrix(integer(), $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(matrix(integer(), 3, 3, dimnames = list(NU $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(matrix(integer(), 3, 3, dimnames = list(LE $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(matrix(integer(), 3, 3, dimnames = list(a $success [1] 0 $message $message$message [1] "be" [2] "`alike` the corresponding element in target" [3] "" [4] "" $message$wrap $message$wrap[[1]] dimnames(NULL) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 6 7/14 internal.R: vetr:::attr_compare(matrix(integer(), 3, 3, dimnames = list(A $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(structure(list(integer(), character())), $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(structure(list(integer(), character()), cl $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(structure(list(), class = letters[2:4]), $success [1] 0 $message $message$message [1] "be" "3" "is" "4" $message$wrap $message$wrap[[1]] length(class(NULL)) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 6 7/14 internal.R: vetr:::attr_compare(structure(list(integer(), character())), $success [1] 0 $message $message$message [1] "not have" "attribute \"class\"" "" [4] "" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 6 7/14 internal.R: vetr:::attr_compare(structure(list(integer(), character()), cl $success [1] 0 $message $message$message [1] "not have" "attribute \"names\"" "" [4] "" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 7 7/14 internal.R: vetr:::attr_compare(structure(list(), welp = list(NULL, 1:3), $success [1] 0 $message $message$message [1] "have" "attribute \"belp\"" "" [4] "" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 7 7/14 internal.R: vetr:::attr_compare(structure(list(), welp = list(NULL, 1:3), $success [1] 0 $message $message$message [1] "have" "attribute \"belp\"" "" [4] "" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 7 7/14 internal.R: unitizer_sect("Closures", { 7/14 internal.R: vetr:::fun_alike(print, print.data.frame) [1] TRUE 7/14 internal.R: vetr:::fun_alike(print.data.frame, print) [1] "have" [2] "argument `digits` after argument `...`" [3] "" [4] "" 7/14 internal.R: vetr:::fun_alike(summary, summary.lm) [1] TRUE 7/14 internal.R: vetr:::fun_alike(summary.lm, summary) [1] "have" [2] "argument `correlation` after argument `object`" [3] "" [4] "" 7/14 internal.R: fn0 <- function(x, y) NULL 7/14 internal.R: fn1 <- function(x, y, z) NULL 7/14 internal.R: fn2 <- function(y, x) NULL 7/14 internal.R: fn3 <- function(x = 1, y = 2) NULL 7/14 internal.R: fn4 <- function(x, ...) NULL 7/14 internal.R: fn5 <- function(x) NULL 7/14 internal.R: fn6 <- function(x, y, z, ...) NULL 7/14 internal.R: fn7 <- function(x, ..., y) NULL 7/14 internal.R: fn8 <- function(x, a, ..., g, y) NULL 7/14 internal.R: fn9 <- function(x, a, ..., g, y, w) NULL 7/14 internal.R: vetr:::fun_alike(fn0, fn1) [1] "not have" "argument `z` after argument `y`" [3] "" "" 7/14 internal.R: vetr:::fun_alike(fn1, fn0) [1] "have" "argument `z` after argument `y`" [3] "" "" 7/14 internal.R: vetr:::fun_alike(fn4, fn1) [1] "have" "a `...` argument" "" "" 7/14 internal.R: vetr:::fun_alike(fn0, fn2) [1] "have" "argument `x` as first argument" [3] "" "" 7/14 internal.R: vetr:::fun_alike(fn0, fn3) [1] TRUE 7/14 internal.R: vetr:::fun_alike(fn3, fn0) [1] "have" "argument `x` as first argument" [3] "" "" 7/14 internal.R: vetr:::fun_alike(fn4, fn5) [1] "have" "argument `...` after argument `x`" [3] "" "" 7/14 internal.R: vetr:::fun_alike(fn4, fn6) [1] TRUE 7/14 internal.R: vetr:::fun_alike(fn4, fn7) [1] TRUE 7/14 internal.R: vetr:::fun_alike(fn7, fn4) [1] "have" "argument `y` after argument `...`" [3] "" "" 7/14 internal.R: vetr:::fun_alike(fn7, fn8) [1] TRUE 7/14 internal.R: vetr:::fun_alike(fn7, fn9) [1] "not have" "argument `w` after argument `y`" [3] "" "" 7/14 internal.R: vetr:::fun_alike(`+`, `-`) [1] TRUE 7/14 internal.R: vetr:::fun_alike(substitute, function(expr, env) NULL) [1] TRUE 7/14 internal.R: vetr:::fun_alike(function(expr, env) NULL, substitute) [1] TRUE 7/14 internal.R: vetr:::fun_alike(substitute, on.exit) [1] "have" [2] "argument `env` after argument `expr`" [3] "" [4] "" 7/14 internal.R: vetr:::fun_alike(on.exit, substitute) [1] "have" "argument `expr` as first argument" [3] "" "" 7/14 internal.R: vetr:::fun_alike(`[`, substitute) Error in vetr:::fun_alike(`[`, substitute) : argument of type NILSXP is not a closure Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 7/14 internal.R: vetr:::fun_alike(`[`, `&&`) Error in vetr:::fun_alike(`[`, `&&`) : argument of type NILSXP is not a closure Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 7/14 internal.R: vetr:::fun_alike(identity, 10) Error in vetr:::fun_alike(identity, 10) : Arguments must be functions. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 7/14 internal.R: vetr:::fun_alike(10, identity) Error in vetr:::fun_alike(10, identity) : Arguments must be functions. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 7/14 internal.R: unitizer_sect("Env Track", { 7/14 internal.R: el.1 <- replicate(5, new.env()) 7/14 internal.R: el.2 <- el.1[c(1, 1, 2, 3, 4, 1, 2, 3, 5, 1)] 7/14 internal.R: vetr:::env_track(el.1, 1L) [1] 1 3 3 1 3 7/14 internal.R: vetr:::env_track(el.2, 1L) [1] 1 0 1 3 1 0 0 0 1 0 7/14 internal.R: vetr:::env_track(el.1, 1L, 3L) [1] 1 3 -1 -1 -1 7/14 internal.R: vetr:::env_track(list(1, 2, 3), 1L, 3L) Error in vetr:::env_track(list(1, 2, 3), 1L, 3L) : All contents of `env` should be environments; error at item 1 Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 7/14 internal.R: unitizer_sect("valid names", { 7/14 internal.R: vetr:::is_valid_name("hello") [1] TRUE 7/14 internal.R: vetr:::is_valid_name(".hello") [1] TRUE 7/14 internal.R: vetr:::is_valid_name("123") [1] FALSE 7/14 internal.R: vetr:::is_valid_name("hello there") [1] FALSE 7/14 internal.R: vetr:::is_valid_name("h1ello") [1] TRUE 7/14 internal.R: vetr:::is_valid_name("_hello") [1] FALSE 7/14 internal.R: vetr:::is_valid_name(".1fail") [1] FALSE 7/14 internal.R: vetr:::is_valid_name("NULL") [1] FALSE 7/14 internal.R: vetr:::is_valid_name("FALSE") [1] FALSE 7/14 internal.R: vetr:::is_valid_name(letters) Error in vetr:::is_valid_name(letters) : Argument `name` must be character(1L) Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 7/14 internal.R: unitizer_sect("Is dfish", { 7/14 internal.R: df1 <- list(a = 1:10, b = letters[1:10]) 7/14 internal.R: df2 <- list(a = 1:10, b = letters[1:9]) 7/14 internal.R: vetr:::is_dfish(df1) [1] TRUE 7/14 internal.R: vetr:::is_dfish(df2) [1] FALSE 7/14 internal.R: vetr:::is_dfish(1:10) [1] FALSE 7/14 internal.R: unitizer_sect("syntactic", { 7/14 internal.R: vetr:::syntactic_names(quote(hello)) [1] TRUE 7/14 internal.R: vetr:::syntactic_names(quote(`hello there`)) [1] FALSE 7/14 internal.R: vetr:::syntactic_names(quote(1 + 1)) [1] TRUE 7/14 internal.R: vetr:::syntactic_names(quote(1 %hello there% 1)) [1] TRUE 7/14 internal.R: vetr:::syntactic_names(quote(1 + `hello there`)) [1] FALSE 7/14 internal.R: vetr:::syntactic_names(quote(-(1:3))) [1] TRUE 7/14 internal.R: vetr:::syntactic_names(quote(c(-1:1, NA_integer_))) [1] TRUE 7/14 internal.R: vetr:::syntactic_names(quote(a == 25)) [1] TRUE 7/14 internal.R: vetr:::syntactic_names(quote(all(-1:1 > 0))) [1] TRUE 7/14 internal.R: unitizer_sect("Pad or Quote", { 7/14 internal.R: vetr:::pad_or_quote(quote(1 + 1)) [1] "`1 + 1`" 7/14 internal.R: vetr:::pad_or_quote(quote(!anyNA(1 + 1))) [1] "`!anyNA(1 + 1)`" 7/14 internal.R: vetr:::pad_or_quote(quote(1 + 1), syntactic = 0L) [1] "{1 + 1}" 7/14 internal.R: vetr:::pad_or_quote(quote(1 + 1), syntactic = 1L) [1] "`1 + 1`" 7/14 internal.R: unitizer_sect("Merge messages", { 7/14 internal.R: vetr:::msg_sort(list(letters[5:1], letters[1:5])) [[1]] [1] "a" "b" "c" "d" "e" [[2]] [1] "e" "d" "c" "b" "a" 7/14 internal.R: vetr:::msg_sort(list(c("a", "a", "a", "z", "b"), c("a", "a", [[1]] [1] "a" "a" "z" "b" "b" [[2]] [1] "a" "a" "a" "z" "b" 7/14 internal.R: vetr:::msg_sort(list(letters[5:1])) [[1]] [1] "e" "d" "c" "b" "a" 7/14 internal.R: vetr:::msg_sort(as.list(letters[5:1])) [[1]] [1] "a" [[2]] [1] "b" [[3]] [1] "c" [[4]] [1] "d" [[5]] [1] "e" 7/14 internal.R: vetr:::msg_sort(list(letters[1:5], NULL)) Error in vetr:::msg_sort(list(letters[1:5], NULL)) : Internal Error: unexpected string format to merge; contact maintainer Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 7/14 internal.R: vetr:::msg_sort(letters) Error in vetr:::msg_sort(letters) : Expected list argument, got character Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 7/14 internal.R: msgs <- list(c("`my_var`", "be", "integer", "is", "character") 7/14 internal.R: vetr:::msg_merge(msgs) [[1]] [1] "`attr(my_var)`" "be" "\"NULL\"" "is" [5] "list" [[2]] [1] "`length(names(my_var))`" "be" [3] "2, or 3" "is" [5] "4" [[3]] [1] "`my_var`" "be" [3] "\"NULL\", integer, or matrix" "is" [5] "character" [[4]] [1] "`my_var`" "have" "3 columns" "has" "1" 7/14 internal.R: vetr:::msg_merge(msgs[1:3]) [[1]] [1] "`length(names(my_var))`" "be" [3] "2" "is" [5] "4" [[2]] [1] "`my_var`" "be" "integer" "is" "character" [[3]] [1] "`my_var`" "have" "3 columns" "has" "1" 7/14 internal.R: vetr:::msg_merge(msgs[1]) [[1]] [1] "`my_var`" "be" "integer" "is" "character" 7/14 internal.R: vetr:::msg_merge_2(msgs) [[1]] [1] "`attr(my_var)` should be \"NULL\" (is list)" [[2]] [1] "`length(names(my_var))` should be 2, or 3 (is 4)" [[3]] [1] "`my_var` should be \"NULL\", integer, or matrix (is character)" [[4]] [1] "`my_var` should have 3 columns (has 1)" 7/14 internal.R: unitizer_sect("Hash", { 7/14 internal.R: keys <- vapply(1:26, function(x) paste0(letters[seq(x)], colla 7/14 internal.R: values <- vapply(1:26, function(x) paste0(LETTERS[seq(x)], col 7/14 internal.R: vetr:::hash_test(keys, values) [1] "A" "AB" [3] "ABC" "ABCD" [5] "ABCDE" "ABCDEF" [7] "ABCDEFG" "ABCDEFGH" [9] "ABCDEFGHI" "ABCDEFGHIJ" [11] "ABCDEFGHIJK" "ABCDEFGHIJKL" [13] "ABCDEFGHIJKLM" "ABCDEFGHIJKLMN" [15] "ABCDEFGHIJKLMNO" "ABCDEFGHIJKLMNOP" [17] "ABCDEFGHIJKLMNOPQ" "ABCDEFGHIJKLMNOPQR" [19] "ABCDEFGHIJKLMNOPQRS" "ABCDEFGHIJKLMNOPQRST" [21] "ABCDEFGHIJKLMNOPQRSTU" "ABCDEFGHIJKLMNOPQRSTUV" [23] "ABCDEFGHIJKLMNOPQRSTUVW" "ABCDEFGHIJKLMNOPQRSTUVWX" [25] "ABCDEFGHIJKLMNOPQRSTUVWXY" "ABCDEFGHIJKLMNOPQRSTUVWXYZ" 7/14 internal.R: vetr:::track_hash(letters[1:3], 2L) [1] 1 1 4 7/14 internal.R: vetr:::track_hash(letters[1:5], 2L) [1] 1 1 4 1 8 7/14 internal.R: vetr:::track_hash(c("a", "b", "b"), 2L) [1] 1 1 0 7/14 internal.R: vetr:::track_hash(c("a", "b", NA, 1, "b"), 2L) [1] 1 1 NA 1 1 7/14 internal.R: vetr:::track_hash(c("a", "b", NA, 1, "a"), 2L) [1] 1 1 NA 1 0 7/14 internal.R: keys <- c("a", "b", NA, 1, "b", "hello", "goodbye", "a", NA, 7/14 internal.R: vetr:::track_hash(keys, 8L) [1] 1 1 NA 1 1 1 1 0 NA 3 0 1 0 7/14 internal.R: collisions <- c("f b", "n b", "n d", "t m", "b r", "n w", "q w 7/14 internal.R: keys.1 <- c(collisions, NA, 0, collisions) 7/14 internal.R: vetr:::track_hash(keys.1, 64L) [1] 1 1 1 1 1 1 1 1 NA 0 1 1 1 1 1 1 1 1 7/14 internal.R: keys.2 <- c(collisions, NA, 4, collisions) 7/14 internal.R: vetr:::track_hash(keys.2, 64L) [1] 1 1 1 1 1 1 1 1 NA 4 0 0 0 0 1 1 1 1 7/14 internal.R: vetr:::hash_test2(c(collisions[1:3], collisions[1:3], "hello") [1] 0 0 0 0 0 0 -1 7/14 internal.R: unitizer_sect("Mode", { 7/14 internal.R: vetr:::alike_mode(NULL) [1] "NULL" 7/14 internal.R: vetr:::alike_mode(quote(a)) [1] "name" 7/14 internal.R: vetr:::alike_mode(mean) [1] "function" 7/14 internal.R: vetr:::alike_mode(`+`) [1] "function" 7/14 internal.R: vetr:::alike_mode(log) [1] "function" 7/14 internal.R: vetr:::alike_mode(quote(1 + 1)) [1] "call" 7/14 internal.R: unitizer_sect("Find funs", { 7/14 internal.R: fun <- function(x, y) NULL 7/14 internal.R: vetr:::find_fun(quote(fun), environment()) function(x, y) NULL <environment: 0x561b8b0f2350> 7/14 internal.R: vetr:::find_fun(quote(asdhfqwerasdfasdf), environment()) NULL 7/14 internal.R: fun2 <- function(x) vetr:::find_fun(quote(x), environment()) 7/14 internal.R: (fun2()) NULL 8/14 language.R: 8/14 language.R: library(vetr) 8/14 language.R: unitizer_sect("Match Calls", { 8/14 language.R: vetr:::match_call_alike(quote(var(y = 1:10, runif(10))), basee var(y = 1:10, runif(10)) 8/14 language.R: env0 <- new.env() 8/14 language.R: env0$var <- function(yollo, zambia) NULL 8/14 language.R: vetr:::match_call_alike(quote(var(y = 1:10, runif(10))), env0) var(yollo = 1:10, zambia = runif(10)) 8/14 language.R: unitizer_sect("Calls", { 8/14 language.R: c0 <- quote(fun(a, b, a, 25)) 8/14 language.R: c1 <- quote(fun(x, y, x, "hello")) 8/14 language.R: c2 <- quote(fun(x, y, z, "hello")) 8/14 language.R: c3 <- quote(FUN(x, y, x, 1.01)) 8/14 language.R: c4 <- quote(fun(x, y, x, z)) 8/14 language.R: c5 <- quote(fun(a + b + a, FUN(z, a + 1))) 8/14 language.R: c6 <- quote(fun(x + y + x, FUN(w, x + 2))) 8/14 language.R: c7 <- quote(fun(x + y + x, FUN(w, y + 2))) 8/14 language.R: c8 <- quote(fun(x + y + x, FUN(w, x - 2))) 8/14 language.R: c9 <- quote(fun(x + y + x, FUN(w, x + "hello"))) 8/14 language.R: c10 <- quote(fun(1)) 8/14 language.R: c11 <- quote(fun(1, 2)) 8/14 language.R: c12 <- quote(a + b + c) 8/14 language.R: c13 <- quote((a + b) + c) 8/14 language.R: c14 <- quote(a + (b + c)) 8/14 language.R: vetr:::lang_alike(c0, c1, NULL) $success [1] TRUE $message NULL $call.match NULL $call.ind NULL $call.ind.sub.par NULL $call.orig NULL 8/14 language.R: vetr:::lang_alike(c0, c2, NULL) $success [1] FALSE $message $message$message [1] "be" "`x`" "is" "`z`" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match fun(x, y, z, "hello") $call.ind NULL[[4]] $call.ind.sub.par $call.ind.sub.par[[1]] NULL $call.ind.sub.par[[2]] [1] 4 $call.orig fun(x, y, z, "hello") 8/14 language.R: vetr:::lang_alike(c0, c3, NULL) $success [1] FALSE $message $message$message [1] "be" "a call to `fun`" "is" "a call to `FUN`" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match FUN(x, y, x, 1.01) $call.ind NULL[[1]] $call.ind.sub.par $call.ind.sub.par[[1]] NULL $call.ind.sub.par[[2]] [1] 1 $call.orig FUN(x, y, x, 1.01) 8/14 language.R: vetr:::lang_alike(c0, c4, NULL) $success [1] FALSE $message $message$message [1] "be" "\"double\"" "is" "\"symbol\"" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match fun(x, y, x, z) $call.ind NULL[[5]] $call.ind.sub.par $call.ind.sub.par[[1]] NULL $call.ind.sub.par[[2]] [1] 5 $call.orig fun(x, y, x, z) 8/14 language.R: vetr:::lang_alike(c5, c6, NULL) $success [1] TRUE $message NULL $call.match NULL $call.ind NULL $call.ind.sub.par NULL $call.orig NULL 8/14 language.R: vetr:::lang_alike(c5, c7, NULL) $success [1] FALSE $message $message$message [1] "be" "`x`" "is" "`y`" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match fun(x + y + x, FUN(w, y + 2)) $call.ind NULL[[3]][[3]][[2]] $call.ind.sub.par $call.ind.sub.par[[1]] NULL $call.ind.sub.par[[2]] [1] 3 $call.orig fun(x + y + x, FUN(w, y + 2)) 8/14 language.R: vetr:::lang_alike(c5, c8, NULL) $success [1] FALSE $message $message$message [1] "be" "a call to `+`" "is" "a call to `-`" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match fun(x + y + x, FUN(w, x - 2)) $call.ind NULL[[3]][[3]][[1]] $call.ind.sub.par $call.ind.sub.par[[1]] NULL $call.ind.sub.par[[2]] [1] 3 $call.orig fun(x + y + x, FUN(w, x - 2)) 8/14 language.R: vetr:::lang_alike(c5, c9, NULL) $success [1] TRUE $message NULL $call.match NULL $call.ind NULL $call.ind.sub.par NULL $call.orig NULL 8/14 language.R: vetr:::lang_alike(c11, c10, NULL) $success [1] FALSE $message $message$message [1] "have" "2 arguments" "has" "1" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match fun(1) $call.ind NULL $call.ind.sub.par NULL $call.orig fun(1) 8/14 language.R: vetr:::lang_alike(c12, c13) $success [1] TRUE $message NULL $call.match NULL $call.ind NULL $call.ind.sub.par NULL $call.orig NULL 8/14 language.R: vetr:::lang_alike(c12, c14) $success [1] FALSE $message $message$message [1] "be" "a call to `+`" "is" "\"symbol\"" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match a + (b + c) $call.ind NULL[[2]] $call.ind.sub.par $call.ind.sub.par[[1]] NULL $call.ind.sub.par[[2]] [1] 2 $call.orig a + (b + c) 8/14 language.R: vetr:::lang_alike(c13, c14) $success [1] FALSE $message $message$message [1] "be" "a call to `+`" "is" "\"symbol\"" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match a + (b + c) $call.ind NULL[[2]] $call.ind.sub.par $call.ind.sub.par[[1]] NULL $call.ind.sub.par[[2]] [1] 2 $call.orig a + (b + c) 8/14 language.R: vetr:::lang_alike(c14, c13) $success [1] FALSE $message $message$message [1] "be" "\"symbol\"" "is" "\"language\"" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match (a + b) + c $call.ind NULL[[2]][[2]] $call.ind.sub.par $call.ind.sub.par[[1]] NULL $call.ind.sub.par[[2]] [1] 2 $call.orig (a + b) + c 8/14 language.R: fun <- function(abc, bcd, efg) NULL 8/14 language.R: ca <- quote(fun(a, b, a)) 8/14 language.R: cb <- quote(fun(x, e = x, y)) 8/14 language.R: vetr:::lang_alike(ca, cb, NULL) $success [1] FALSE $message $message$message [1] "not be" "`x`" "" "" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match fun(x, e = x, y) $call.ind NULL$e $call.ind.sub.par $call.ind.sub.par[[1]] NULL $call.ind.sub.par[[2]] e $call.orig fun(x, e = x, y) 8/14 language.R: vetr:::lang_alike(cb, ca, NULL) $success [1] FALSE $message $message$message [1] "have" "argument `e` after argument 1" [3] "has" "unnamed argument" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match fun(a, b, a) $call.ind NULL $call.ind.sub.par NULL $call.orig fun(a, b, a) 8/14 language.R: vetr:::lang_alike(ca, cb) $success [1] TRUE $message NULL $call.match NULL $call.ind NULL $call.ind.sub.par NULL $call.orig NULL 8/14 language.R: ca.1 <- ca 8/14 language.R: cb.1 <- cb 8/14 language.R: ca.1[[1]] <- fun 8/14 language.R: cb.1[[1]] <- fun 8/14 language.R: vetr:::lang_alike(ca.1, cb.1) $success [1] TRUE $message NULL $call.match NULL $call.ind NULL $call.ind.sub.par NULL $call.orig NULL 8/14 language.R: cc <- quote(fun(a, b, fun(b = 1))) 8/14 language.R: cd <- quote(fun(a, b, fun(c = 1))) 8/14 language.R: vetr:::lang_alike(cc, cd) $success [1] FALSE $message $message$message [1] "have" "argument `bcd` as first argument" [3] "has" "`c`" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match fun(abc = a, bcd = b, efg = fun(c = 1)) $call.ind NULL[[4]] $call.ind.sub.par $call.ind.sub.par[[1]] NULL $call.ind.sub.par[[2]] [1] 4 $call.orig fun(a, b, fun(c = 1)) 8/14 language.R: ce <- quote(fun(a, b, NULL)) 8/14 language.R: vetr:::lang_alike(cc, ce) $success [1] FALSE $message $message$message [1] "be" "a call to `fun`" "is" "\"NULL\"" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match fun(abc = a, bcd = b, efg = NULL) $call.ind NULL[[4]] $call.ind.sub.par $call.ind.sub.par[[1]] NULL $call.ind.sub.par[[2]] [1] 4 $call.orig fun(a, b, NULL) 8/14 language.R: vetr:::lang_alike(ce, cc) $success [1] TRUE $message NULL $call.match NULL $call.ind NULL $call.ind.sub.par NULL $call.orig NULL 8/14 language.R: da <- quote(ff(a = 1, b = 2, c = 3)) 8/14 language.R: db <- quote(ff(a = 1, d = 2, c = 3)) 8/14 language.R: vetr:::lang_alike(da, db) $success [1] FALSE $message $message$message [1] "have" "argument `b` after argument `a`" [3] "has" "`d`" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match ff(a = 1, d = 2, c = 3) $call.ind NULL $call.ind.sub.par NULL $call.orig ff(a = 1, d = 2, c = 3) 8/14 language.R: vetr:::lang_alike(cc, 1:10) Error in vetr:::lang_alike(cc, 1:10) : Arguments must be LANGSXP, SYMSXP, or R_NilValue Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 8/14 language.R: vetr:::lang_alike(ce, cc, match.call.env = 1:10) Error in vetr:::lang_alike(ce, cc, match.call.env = 1:10) : Argument `match.call.env` must be an environment or NULL Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 8/14 language.R: unitizer_sect("Calls as char", { 8/14 language.R: vetr:::lang_alike_chr(c0, c1, NULL) [1] "" 8/14 language.R: vetr:::lang_alike_chr(c0, c2, NULL) [1] "be" "`x`" "is" "`z`" 8/14 language.R: vetr:::lang_alike_chr(c0, c3, NULL) [1] "be" "a call to `fun`" "is" "a call to `FUN`" 8/14 language.R: vetr:::lang_alike_chr(c0, c4, NULL) [1] "be" "\"double\"" "is" "\"symbol\"" 8/14 language.R: vetr:::lang_alike_chr(c5, c6, NULL) [1] "" 8/14 language.R: vetr:::lang_alike_chr(c5, c7, NULL) [1] "be" "`x`" "is" "`y`" 8/14 language.R: vetr:::lang_alike_chr(c5, c8, NULL) [1] "be" "a call to `+`" "is" "a call to `-`" 8/14 language.R: vetr:::lang_alike_chr(c5, c9, NULL) [1] "" 8/14 language.R: vetr:::lang_alike_chr(ca, cb, NULL) [1] "not be" "`x`" "" "" 8/14 language.R: vetr:::lang_alike_chr(cb, ca, NULL) [1] "have" "argument `e` after argument 1" [3] "has" "unnamed argument" 8/14 language.R: vetr:::lang_alike_chr(ca, cb) [1] "" 8/14 language.R: vetr:::lang_alike_chr(cc, cd) [1] "have" "argument `bcd` as first argument" [3] "has" "`c`" 8/14 language.R: vetr:::lang_alike_chr(cc, ce) [1] "be" "a call to `fun`" "is" "\"NULL\"" 8/14 language.R: vetr:::lang_alike_chr(ce, cc) [1] "" 8/14 language.R: unitizer_sect("Formulas", { 8/14 language.R: f0 <- y ~ x + 1 8/14 language.R: f1 <- a ~ b + 1 8/14 language.R: f2 <- a ~ b + 2 8/14 language.R: f3 <- y ~ x + log(x) + z - 1 8/14 language.R: f4 <- a ~ b + log(b) + c - 1 8/14 language.R: f5 <- a ~ b + log(c) + b - 1 8/14 language.R: f6 <- a ~ b + ln(b) + c - 1 8/14 language.R: f7 <- a ~ b + log(b) + c + 1 8/14 language.R: vetr:::lang_alike(f0, f1, NULL) $success [1] TRUE $message NULL $call.match NULL $call.ind NULL $call.ind.sub.par NULL $call.orig NULL 8/14 language.R: vetr:::lang_alike(f0, f2, NULL) $success [1] FALSE $message $message$message [1] "have" "identical constant values" [3] "" "" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match a ~ b + 2 <environment: 0x561b8e3276e0> $call.ind NULL[[3]][[3]] $call.ind.sub.par $call.ind.sub.par[[1]] NULL $call.ind.sub.par[[2]] [1] 3 $call.orig a ~ b + 2 <environment: 0x561b8e3276e0> 8/14 language.R: vetr:::lang_alike(f3, f4, NULL) $success [1] TRUE $message NULL $call.match NULL $call.ind NULL $call.ind.sub.par NULL $call.orig NULL 8/14 language.R: vetr:::lang_alike(f3, f5, NULL) $success [1] FALSE $message $message$message [1] "be" "`b`" "is" "`c`" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match a ~ b + log(c) + b - 1 <environment: 0x561b8e3276e0> $call.ind NULL[[3]][[2]][[2]][[3]][[2]] $call.ind.sub.par $call.ind.sub.par[[1]] NULL $call.ind.sub.par[[2]] [1] 3 $call.orig a ~ b + log(c) + b - 1 <environment: 0x561b8e3276e0> 8/14 language.R: vetr:::lang_alike(f3, f6, NULL) $success [1] FALSE $message $message$message [1] "be" "a call to `log`" "is" "a call to `ln`" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match a ~ b + ln(b) + c - 1 <environment: 0x561b8e3276e0> $call.ind NULL[[3]][[2]][[2]][[3]][[1]] $call.ind.sub.par $call.ind.sub.par[[1]] NULL $call.ind.sub.par[[2]] [1] 3 $call.orig a ~ b + ln(b) + c - 1 <environment: 0x561b8e3276e0> 8/14 language.R: vetr:::lang_alike(f3, f7, NULL) $success [1] FALSE $message $message$message [1] "be" "a call to `-`" "is" "a call to `+`" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match a ~ b + log(b) + c + 1 <environment: 0x561b8e3276e0> $call.ind NULL[[3]][[1]] $call.ind.sub.par $call.ind.sub.par[[1]] NULL $call.ind.sub.par[[2]] [1] 3 $call.orig a ~ b + log(b) + c + 1 <environment: 0x561b8e3276e0> 8/14 language.R: unitizer_sect("Deparse", { 8/14 language.R: l0 <- quote(a + b + fun(x + funz(matrix_over[25, 32]) + transf 8/14 language.R: (dep.txt <- vetr:::dep_alike(l0)) [1] "a + b + fun(x + funz(matrix_over[25, 32]) + transform(iris, x = Sepal.Width * " [2] " 3)/the_donkey_ate_a_carrot %in% {" [3] " paste0(match(letter, LETTERS), c(\"hello there\"))" [4] "})" 8/14 language.R: vetr:::dep_alike(l0, 30) [1] "a + b + fun(x + funz(matrix_over[25, " [2] " 32]) + transform(iris, x = Sepal.Width * " [3] " 3)/the_donkey_ate_a_carrot %in% " [4] " {" [5] " paste0(match(letter, LETTERS), " [6] " c(\"hello there\"))" [7] " })" 8/14 language.R: vetr:::pad(dep.txt) [1] "> a + b + fun(x + funz(matrix_over[25, 32]) + transform(iris, x = Sepal.Width * \n+ 3)/the_donkey_ate_a_carrot %in% {\n+ paste0(match(letter, LETTERS), c(\"hello there\"))\n+ })\n" 8/14 language.R: old.opt <- options(prompt = ">>", continue = " |") 8/14 language.R: vetr:::pad(dep.txt) [1] ">>a + b + fun(x + funz(matrix_over[25, 32]) + transform(iris, x = Sepal.Width * \n | 3)/the_donkey_ate_a_carrot %in% {\n | paste0(match(letter, LETTERS), c(\"hello there\"))\n |})\n" 8/14 language.R: options(old.opt) 8/14 language.R: vetr:::pad(dep.txt, pad = 4) [1] " a + b + fun(x + funz(matrix_over[25, 32]) + transform(iris, x = Sepal.Width * \n 3)/the_donkey_ate_a_carrot %in% {\n paste0(match(letter, LETTERS), c(\"hello there\"))\n })\n" 8/14 language.R: vetr:::pad(dep.txt, pad = 4, lines = 2) [1] " a + b + fun(x + funz(matrix_over[25, 32]) + transform(iris, x = Sepal.Width * \n 3)/the_donkey_ate_a_carrot %in% {...\n" 8/14 language.R: vetr:::dep_oneline(quote(1 + 1 + 3 + 944254235), 10) [1] "1 + 1 + .." 8/14 language.R: vetr:::dep_oneline(quote(1 + 1 + 3), 10) [1] "1 + 1 + 3" 8/14 language.R: vetr:::dep_oneline(quote(1 + 1 + 3), "hello") Warning in vetr:::dep_oneline(quote(1 + 1 + 3), "hello") : NAs introduced by coercion Error in vetr:::dep_oneline(quote(1 + 1 + 3), "hello") : Internal Error: arg max_chars and keep_at_end must be positive Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 8/14 language.R: vetr:::dep_oneline(quote(1 + 1 + 3 - (mean(1:10) + 3)), 15, 1L [1] "1 + 1 + 3 - ..)" 9/14 misc.R: 9/14 misc.R: library(vetr) 9/14 misc.R: unitizer_sect("All", { 9/14 misc.R: vetr:::val_all(1:10) [1] -2 9/14 misc.R: vetr:::val_all(rep(TRUE, 10)) [1] 1 9/14 misc.R: vetr:::val_all(c(rep(TRUE, 10), FALSE, TRUE)) [1] 0 9/14 misc.R: vetr:::val_all(c(rep(TRUE, 5), NA, rep(TRUE, 5))) [1] -4 9/14 misc.R: vetr:::val_all(FALSE) [1] -1 9/14 misc.R: vetr:::val_all(TRUE) [1] 2 9/14 misc.R: vetr:::val_all(logical()) [1] 3 9/14 misc.R: vetr:::val_all(NA) [1] -3 9/14 misc.R: vetr:::val_all(c(TRUE, TRUE, NA, TRUE)) [1] -4 9/14 misc.R: unitizer_sect("Hash", { 9/14 misc.R: vetr:::hash_fun(c("f b", "n b", "n d", "t m", "b r", "n w", "q w", [1] 193 193 193 193 193 193 193 193 9/14 misc.R: unitizer_sect("bench_mark", { 9/14 misc.R: capt_wo_time <- function(x) { 9/14 misc.R: capt_wo_time(bench_mark(Sys.sleep(1.2), times = 1)) [1] "Mean eval time from 1 iteration, in seconds:" [2] " Sys.sleep(1.2) ~" 9/14 misc.R: capt_wo_time(bench_mark(Sys.sleep(0.01), times = 10)) [1] "Mean eval time from 10 iterations, in milliseconds:" [2] " Sys.sleep(0.01) ~" 9/14 misc.R: capt_wo_time(bench_mark(1 + 1, NULL, times = 100)) [1] "Mean eval time from 100 iterations, in microseconds:" [2] " 1 + 1 ~" [3] " NULL ~" 9/14 misc.R: unitizer_sect("sort pair lists", { 9/14 misc.R: vetr:::list_as_sorted_vec(pairlist(c = 1, a = list(), b = NULL)) $a list() $b NULL $c [1] 1 9/14 misc.R: vetr:::list_as_sorted_vec(pairlist(b = 1, 2, a = 3)) [[1]] [1] 2 $a [1] 3 $b [1] 1 9/14 misc.R: vetr:::list_as_sorted_vec(pairlist()) list() 9/14 misc.R: vetr:::list_as_sorted_vec(pairlist(a = 1)) $a [1] 1 10/14 parse.R: 10/14 parse.R: library(vetr) 10/14 parse.R: unitizer_sect("name_sub", { 10/14 parse.R: vetr:::name_sub(quote(.), quote(xyz)) xyz 10/14 parse.R: vetr:::name_sub(quote(.), quote(x + yz)) x + yz 10/14 parse.R: vetr:::name_sub(quote(.), c(1:3)) [1] 1 2 3 10/14 parse.R: vetr:::name_sub(quote(..), quote(xyz)) . 10/14 parse.R: vetr:::name_sub(quote(...), quote(xyz)) .. 10/14 parse.R: vetr:::name_sub(quote(.zzz), quote(xyz)) .zzz 10/14 parse.R: vetr:::name_sub(quote(zzz.), quote(xyz)) zzz. 10/14 parse.R: vetr:::name_sub(quote(zzz), quote(xyz)) zzz 10/14 parse.R: vetr:::name_sub(quote(a + b), quote(xyz)) a + b 10/14 parse.R: vetr:::name_sub(quote(. + .), quote(xyz)) . + . 10/14 parse.R: vetr:::name_sub(quote(.(zzz)), quote(xyz)) .(zzz) 10/14 parse.R: vetr:::name_sub("hello", quote(xyz)) [1] "hello" 10/14 parse.R: unitizer_sect("remove parens", { 10/14 parse.R: vetr:::remove_parens(quote((a))) [[1]] a [[2]] [1] 0 10/14 parse.R: vetr:::remove_parens(quote(.(a))) [[1]] a [[2]] [1] 1 10/14 parse.R: vetr:::remove_parens(quote((((a))))) [[1]] a [[2]] [1] 0 10/14 parse.R: vetr:::remove_parens(quote((.((.(a)))))) [[1]] a [[2]] [1] 1 10/14 parse.R: vetr:::remove_parens(quote((a) && .(a))) [[1]] (a) && .(a) [[2]] [1] 0 10/14 parse.R: unitizer_sect("parse", { 10/14 parse.R: x <- quote(.(.) && ((a))) 10/14 parse.R: vetr:::parse_validator(x, quote(arg_to_validate)) [[1]] NULL && a [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [1] 10 [[2]][[3]] [1] 999 [[3]] arg_to_validate && a 10/14 parse.R: (x) .(.) && ((a)) 10/14 parse.R: vetr:::parse_validator(quote(FALSE), quote(arg_to_validate)) [[1]] [1] FALSE [[2]] [1] 999 [[3]] [1] FALSE 10/14 parse.R: vetr:::parse_validator(quote(((FALSE))), quote(arg_to_validate)) [[1]] [1] FALSE [[2]] [1] 999 [[3]] [1] FALSE 10/14 parse.R: vetr:::parse_validator(quote(((FALSE && ((TRUE))))), quote(arg_to [[1]] FALSE && TRUE [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [1] 999 [[2]][[3]] [1] 999 [[3]] FALSE && TRUE 10/14 parse.R: vetr:::parse_validator(quote(.(FALSE)), quote(arg_to_validate)) [[1]] [1] FALSE [[2]] [1] 10 [[3]] [1] FALSE 10/14 parse.R: vetr:::parse_validator(quote(.), quote(arg_to_validate)) [[1]] NULL [[2]] [1] 10 [[3]] arg_to_validate 10/14 parse.R: vetr:::parse_validator(quote(. && a), quote(arg_to_validate)) [[1]] NULL && a [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [1] 10 [[2]][[3]] [1] 999 [[3]] arg_to_validate && a 10/14 parse.R: vetr:::parse_validator(quote(.(.)), quote(arg_to_validate)) [[1]] NULL [[2]] [1] 10 [[3]] arg_to_validate 10/14 parse.R: vetr:::parse_validator(quote(((a && b) || .(.))), quote(arg_to_va [[1]] a && b || NULL [[2]] [[2]][[1]] [1] 2 [[2]][[2]] [[2]][[2]][[1]] [1] 1 [[2]][[2]][[2]] [1] 999 [[2]][[2]][[3]] [1] 999 [[2]][[3]] [1] 10 [[3]] a && b || arg_to_validate 10/14 parse.R: vetr:::parse_validator(quote(matrix(nrow = 3)), quote(arg_to_vali [[1]] matrix(nrow = 3) [[2]] [[2]][[1]] [1] 999 [[2]][[2]] [1] 999 [[3]] matrix(nrow = 3) 10/14 parse.R: vetr:::parse_validator(quote(matrix(nrow = 3) && .(.)), quote(arg [[1]] matrix(nrow = 3) && NULL [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [[2]][[2]][[1]] [1] 999 [[2]][[2]][[2]] [1] 999 [[2]][[3]] [1] 10 [[3]] matrix(nrow = 3) && arg_to_validate 10/14 parse.R: vetr:::parse_validator(quote((a || ((b && c))) && .(a + .)), [[1]] (a || b && c) && a + NULL [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [[2]][[2]][[1]] [1] 2 [[2]][[2]][[2]] [1] 999 [[2]][[2]][[3]] [[2]][[2]][[3]][[1]] [1] 1 [[2]][[2]][[3]][[2]] [1] 999 [[2]][[2]][[3]][[3]] [1] 999 [[2]][[3]] [[2]][[3]][[1]] [1] 10 [[2]][[3]][[2]] [1] 10 [[2]][[3]][[3]] [1] 10 [[3]] (a || b && c) && a + arg_to_validate 10/14 parse.R: vetr:::parse_validator(quote((a || ((b && .(c)))) && (a + .(.))), [[1]] (a || b && c) && a + NULL [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [[2]][[2]][[1]] [1] 2 [[2]][[2]][[2]] [1] 999 [[2]][[2]][[3]] [[2]][[2]][[3]][[1]] [1] 1 [[2]][[2]][[3]][[2]] [1] 999 [[2]][[2]][[3]][[3]] [1] 10 [[2]][[3]] [[2]][[3]][[1]] [1] 10 [[2]][[3]][[2]] [1] 999 [[2]][[3]][[3]] [1] 10 [[3]] (a || b && c) && a + arg_to_validate 10/14 parse.R: vetr:::parse_validator(quote(a && (b + .(c))), quote(arg_to_valid [[1]] a && b + c [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [1] 999 [[2]][[3]] [[2]][[3]][[1]] [1] 10 [[2]][[3]][[2]] [1] 999 [[2]][[3]][[3]] [1] 10 [[3]] a && b + c 10/14 parse.R: vetr:::parse_validator(quote(a && .), "hello") [[1]] a && NULL [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [1] 999 [[2]][[3]] [1] 10 [[3]] a && "hello" 10/14 parse.R: unitizer_sect("token sub", { 10/14 parse.R: vetr:::symb_sub(INT.1) integer(1L) && NO.NA && NO.INF 10/14 parse.R: vetr:::symb_sub(NO.NA) !is.na(.) attr(,"err.msg") [1] "%s should not contain NAs, but does" 10/14 parse.R: unitizer_sect("preset tokens", { 10/14 parse.R: x <- quote(integer(1L)) 10/14 parse.R: y <- quote(integer(1L) || NULL) 10/14 parse.R: z <- quote(integer(1L) && .(!any(is.na(.)))) 10/14 parse.R: vetr:::parse_validator(quote(x), quote(w)) [[1]] integer(1L) [[2]] [[2]][[1]] [1] 999 [[2]][[2]] [1] 999 [[3]] integer(1L) 10/14 parse.R: vetr:::parse_validator(quote(y), quote(w)) [[1]] integer(1L) || NULL [[2]] [[2]][[1]] [1] 2 [[2]][[2]] [[2]][[2]][[1]] [1] 999 [[2]][[2]][[2]] [1] 999 [[2]][[3]] [1] 999 [[3]] integer(1L) || NULL 10/14 parse.R: vetr:::parse_validator(quote(z), quote(w)) [[1]] integer(1L) && !any(is.na(NULL)) [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [[2]][[2]][[1]] [1] 999 [[2]][[2]][[2]] [1] 999 [[2]][[3]] [[2]][[3]][[1]] [1] 10 [[2]][[3]][[2]] [[2]][[3]][[2]][[1]] [1] 10 [[2]][[3]][[2]][[2]] [[2]][[3]][[2]][[2]][[1]] [1] 10 [[2]][[3]][[2]][[2]][[2]] [1] 10 [[3]] integer(1L) && !any(is.na(w)) 10/14 parse.R: vetr:::parse_validator(quote(z || NULL), quote(w)) [[1]] integer(1L) && !any(is.na(NULL)) || NULL [[2]] [[2]][[1]] [1] 2 [[2]][[2]] [[2]][[2]][[1]] [1] 1 [[2]][[2]][[2]] [[2]][[2]][[2]][[1]] [1] 999 [[2]][[2]][[2]][[2]] [1] 999 [[2]][[2]][[3]] [[2]][[2]][[3]][[1]] [1] 10 [[2]][[2]][[3]][[2]] [[2]][[2]][[3]][[2]][[1]] [1] 10 [[2]][[2]][[3]][[2]][[2]] [[2]][[2]][[3]][[2]][[2]][[1]] [1] 10 [[2]][[2]][[3]][[2]][[2]][[2]] [1] 10 [[2]][[3]] [1] 999 [[3]] integer(1L) && !any(is.na(w)) || NULL 10/14 parse.R: unitizer_sect("validators", { 10/14 parse.R: vetr:::parse_validator(INT.1, quote(w)) [[1]] integer(1L) && !is.na(NULL) && is.finite(NULL) [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [[2]][[2]][[1]] [1] 1 [[2]][[2]][[2]] [[2]][[2]][[2]][[1]] [1] 999 [[2]][[2]][[2]][[2]] [1] 999 [[2]][[2]][[3]] [[2]][[2]][[3]][[1]] [1] 10 [[2]][[2]][[3]][[2]] [[2]][[2]][[3]][[2]][[1]] [1] 999 [[2]][[2]][[3]][[2]][[2]] [1] 10 [[2]][[3]] [[2]][[3]][[1]] [1] 10 [[2]][[3]][[2]] [1] 10 [[3]] integer(1L) && !is.na(w) && is.finite(w) 10/14 parse.R: vetr:::parse_validator(INT, quote(w)) [[1]] integer() && !is.na(NULL) && is.finite(NULL) [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [[2]][[2]][[1]] [1] 1 [[2]][[2]][[2]] [[2]][[2]][[2]][[1]] [1] 999 [[2]][[2]][[3]] [[2]][[2]][[3]][[1]] [1] 10 [[2]][[2]][[3]][[2]] [[2]][[2]][[3]][[2]][[1]] [1] 999 [[2]][[2]][[3]][[2]][[2]] [1] 10 [[2]][[3]] [[2]][[3]][[1]] [1] 10 [[2]][[3]][[2]] [1] 10 [[3]] integer() && !is.na(w) && is.finite(w) 10/14 parse.R: vetr:::parse_validator(CHR.1, quote(w)) [[1]] character(1L) && !is.na(NULL) [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [[2]][[2]][[1]] [1] 999 [[2]][[2]][[2]] [1] 999 [[2]][[3]] [[2]][[3]][[1]] [1] 10 [[2]][[3]][[2]] [[2]][[3]][[2]][[1]] [1] 999 [[2]][[3]][[2]][[2]] [1] 10 [[3]] character(1L) && !is.na(w) 10/14 parse.R: vetr:::parse_validator(CHR, quote(w)) [[1]] character() && !is.na(NULL) [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [[2]][[2]][[1]] [1] 999 [[2]][[3]] [[2]][[3]][[1]] [1] 10 [[2]][[3]][[2]] [[2]][[3]][[2]][[1]] [1] 999 [[2]][[3]][[2]][[2]] [1] 10 [[3]] character() && !is.na(w) 10/14 parse.R: vetr:::parse_validator(NUM.1, quote(w)) [[1]] numeric(1L) && !is.na(NULL) && is.finite(NULL) [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [[2]][[2]][[1]] [1] 1 [[2]][[2]][[2]] [[2]][[2]][[2]][[1]] [1] 999 [[2]][[2]][[2]][[2]] [1] 999 [[2]][[2]][[3]] [[2]][[2]][[3]][[1]] [1] 10 [[2]][[2]][[3]][[2]] [[2]][[2]][[3]][[2]][[1]] [1] 999 [[2]][[2]][[3]][[2]][[2]] [1] 10 [[2]][[3]] [[2]][[3]][[1]] [1] 10 [[2]][[3]][[2]] [1] 10 [[3]] numeric(1L) && !is.na(w) && is.finite(w) 10/14 parse.R: vetr:::parse_validator(NUM, quote(w)) [[1]] numeric() && !is.na(NULL) && is.finite(NULL) [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [[2]][[2]][[1]] [1] 1 [[2]][[2]][[2]] [[2]][[2]][[2]][[1]] [1] 999 [[2]][[2]][[3]] [[2]][[2]][[3]][[1]] [1] 10 [[2]][[2]][[3]][[2]] [[2]][[2]][[3]][[2]][[1]] [1] 999 [[2]][[2]][[3]][[2]][[2]] [1] 10 [[2]][[3]] [[2]][[3]][[1]] [1] 10 [[2]][[3]][[2]] [1] 10 [[3]] numeric() && !is.na(w) && is.finite(w) 10/14 parse.R: vetr:::parse_validator(LGL.1, quote(w)) [[1]] logical(1L) && !is.na(NULL) [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [[2]][[2]][[1]] [1] 999 [[2]][[2]][[2]] [1] 999 [[2]][[3]] [[2]][[3]][[1]] [1] 10 [[2]][[3]][[2]] [[2]][[3]][[2]][[1]] [1] 999 [[2]][[3]][[2]][[2]] [1] 10 [[3]] logical(1L) && !is.na(w) 10/14 parse.R: vetr:::parse_validator(LGL, quote(w)) [[1]] logical() && !is.na(NULL) [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [[2]][[2]][[1]] [1] 999 [[2]][[3]] [[2]][[3]][[1]] [1] 10 [[2]][[3]][[2]] [[2]][[3]][[2]][[1]] [1] 999 [[2]][[3]][[2]][[2]] [1] 10 [[3]] logical() && !is.na(w) 10/14 parse.R: vetr:::parse_validator(CPX.1, quote(w)) [[1]] complex(1L) && !is.na(NULL) && is.finite(NULL) [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [[2]][[2]][[1]] [1] 1 [[2]][[2]][[2]] [[2]][[2]][[2]][[1]] [1] 999 [[2]][[2]][[2]][[2]] [1] 999 [[2]][[2]][[3]] [[2]][[2]][[3]][[1]] [1] 10 [[2]][[2]][[3]][[2]] [[2]][[2]][[3]][[2]][[1]] [1] 999 [[2]][[2]][[3]][[2]][[2]] [1] 10 [[2]][[3]] [[2]][[3]][[1]] [1] 10 [[2]][[3]][[2]] [1] 10 [[3]] complex(1L) && !is.na(w) && is.finite(w) 10/14 parse.R: vetr:::parse_validator(CPX, quote(w)) [[1]] complex() && !is.na(NULL) && is.finite(NULL) [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [[2]][[2]][[1]] [1] 1 [[2]][[2]][[2]] [[2]][[2]][[2]][[1]] [1] 999 [[2]][[2]][[3]] [[2]][[2]][[3]][[1]] [1] 10 [[2]][[2]][[3]][[2]] [[2]][[2]][[3]][[2]][[1]] [1] 999 [[2]][[2]][[3]][[2]][[2]] [1] 10 [[2]][[3]] [[2]][[3]][[1]] [1] 10 [[2]][[3]][[2]] [1] 10 [[3]] complex() && !is.na(w) && is.finite(w) 11/14 tev.R: 11/14 tev.R: library(vetr) 11/14 tev.R: unitizer_sect("tev", { 11/14 tev.R: tev(runif(2), numeric(2)) [1] TRUE 11/14 tev.R: tev(runif(3), numeric(2)) [1] "`length(runif(3))` should be 2 (is 3)" 12/14 type.R: 12/14 type.R: library(vetr) 12/14 type.R: unitizer_sect("type_of", { 12/14 type.R: type_of(1:100) [1] "integer" 12/14 type.R: type_of(1.1) [1] "double" 12/14 type.R: type_of(1:100 + 1) [1] "integer" 12/14 type.R: type_of(1:100 + 1/1e+09) [1] "double" 12/14 type.R: type_of(NA_real_) [1] "double" 12/14 type.R: type_of(Inf) [1] "double" 12/14 type.R: type_of(-Inf) [1] "double" 12/14 type.R: unitizer_sect("type_alike", { 12/14 type.R: type_alike(1, 1.1) [1] TRUE 12/14 type.R: type_alike(1L, 1.1) [1] "`1.1` should be type \"integer-like\" (is \"double\")" 12/14 type.R: type_alike(1L, 1.00000001) [1] "`1.00000001` should be type \"integer-like\" (is \"double\")" 12/14 type.R: type_alike(1L, 1) [1] TRUE 12/14 type.R: type_alike(1, 1.1, vetr_settings(type.mode = 1)) [1] TRUE 12/14 type.R: type_alike(1L, 1, vetr_settings(type.mode = 1)) [1] "`1` should be type \"integer\" (is \"double\")" 12/14 type.R: type_alike(1, 1L, vetr_settings(type.mode = 1)) [1] TRUE 12/14 type.R: type_alike(1, 1L, vetr_settings(type.mode = 2)) [1] "`1L` should be type \"double\" (is \"integer\")" 12/14 type.R: type_alike(1:100, 1:100 + 0) [1] TRUE 12/14 type.R: type_alike(1:101, 1:101 + 0) [1] "`1:101 + 0` should be type \"integer\" (is \"double\")" 12/14 type.R: type_alike(1:101, 1:101 + 0, vetr_settings(fuzzy.int.max.len = 200 [1] TRUE 12/14 type.R: type_alike(numeric(), c(1.1, 0.053, 41.8)) [1] TRUE 12/14 type.R: type_alike(numeric(), list(1.1)) [1] "`list(1.1)` should be type \"numeric\" (is \"list\")" 12/14 type.R: type_alike(list(), integer()) [1] "`integer()` should be type \"list\" (is \"integer\")" 12/14 type.R: type_alike(1000000L, 1000000L + 0.1) [1] "`1000000L + 0.1` should be type \"integer-like\" (is \"double\")" 12/14 type.R: type_alike(1000000L, 1000000L + 0) [1] TRUE 12/14 type.R: type_alike(data.frame(a = 1:10), list()) [1] TRUE 12/14 type.R: type_alike(NULL, NULL) [1] TRUE 12/14 type.R: type_alike(1/0, NA) [1] "`NA` should be type \"numeric\" (is \"logical\")" 12/14 type.R: type_alike(1, 1.1, vetr_settings(type.mode = 1:2)) Error in type_alike(1, 1.1, vetr_settings(type.mode = 1:2)) : Setting `type.mode` must be scalar integer (is length 2). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> type_alike 12/14 type.R: type_alike(1, 1.1, vetr_settings(fuzzy.int.max.len = 1:2)) Error in type_alike(1, 1.1, vetr_settings(fuzzy.int.max.len = 1:2)) : Setting `fuzzy.int.max.len` must be scalar integer (is length 2). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> type_alike 12/14 type.R: unitizer_sect("functions", { 12/14 type.R: type_alike(sd, var) [1] TRUE 12/14 type.R: type_alike(`&&`, sd) [1] TRUE 12/14 type.R: type_alike(`&&`, sum) [1] TRUE 12/14 type.R: type_alike(sum, sd) [1] TRUE 12/14 type.R: type_alike(sum, c) [1] TRUE 12/14 type.R: type_alike(`&&`, `[`) [1] TRUE 12/14 type.R: type_alike(sd, 1:3) [1] "`1:3` should be type \"function\" (is \"integer\")" 12/14 type.R: type_alike(sd, var, vetr_settings(type.mode = 1)) [1] TRUE 12/14 type.R: type_alike(`&&`, sd, vetr_settings(type.mode = 1)) [1] "`sd` should be type \"special\" (is \"closure\")" 12/14 type.R: type_alike(`&&`, sum, vetr_settings(type.mode = 1)) [1] "`sum` should be type \"special\" (is \"builtin\")" 12/14 type.R: type_alike(sum, sd, vetr_settings(type.mode = 1)) [1] "`sd` should be type \"builtin\" (is \"closure\")" 12/14 type.R: type_alike(sum, c, vetr_settings(type.mode = 1)) [1] TRUE 12/14 type.R: type_alike(`&&`, `[`, vetr_settings(type.mode = 1)) [1] TRUE 13/14 validate.R: 13/14 validate.R: library(vetr) 13/14 validate.R: set.seed(1) 13/14 validate.R: unitizer_sect("Tokens Pass", { 13/14 validate.R: vet(INT.1, 1) [1] TRUE 13/14 validate.R: vet(INT.1.POS, 1) [1] TRUE 13/14 validate.R: vet(INT.1.NEG, -1) [1] TRUE 13/14 validate.R: vet(INT.1.POS.STR, 1) [1] TRUE 13/14 validate.R: vet(INT.1.NEG.STR, -1) [1] TRUE 13/14 validate.R: vet(INT, -1:1) [1] TRUE 13/14 validate.R: vet(INT.POS, 0:3) [1] TRUE 13/14 validate.R: vet(INT.NEG, 0:-3) [1] TRUE 13/14 validate.R: vet(INT.POS.STR, 1:3) [1] TRUE 13/14 validate.R: vet(INT.NEG.STR, -(1:3)) [1] TRUE 13/14 validate.R: vet(NUM.1, 1.44) [1] TRUE 13/14 validate.R: vet(NUM.1.POS, 1.44) [1] TRUE 13/14 validate.R: vet(NUM.1.NEG, -1.44) [1] TRUE 13/14 validate.R: vet(NUM, runif(5)) [1] TRUE 13/14 validate.R: vet(NUM.POS, runif(5)) [1] TRUE 13/14 validate.R: vet(NUM.NEG, -runif(5)) [1] TRUE 13/14 validate.R: vet(CHR, character()) [1] TRUE 13/14 validate.R: vet(CHR.1, "hello") [1] TRUE 13/14 validate.R: vet(CHR, letters) [1] TRUE 13/14 validate.R: vet(CPX, 1:10 + (0+0.5i)) [1] TRUE 13/14 validate.R: vet(CPX.1, 1 + (0+0.5i)) [1] TRUE 13/14 validate.R: vet(LGL, c(TRUE, FALSE)) [1] TRUE 13/14 validate.R: vet(LGL.1, TRUE) [1] TRUE 13/14 validate.R: unitizer_sect("Tokens Fail", { 13/14 validate.R: vet(INT.1, 1.2) [1] "`1.2` should be type \"integer-like\" (is \"double\")" 13/14 validate.R: vet(INT.1, 1:2) [1] "`length(1:2)` should be 1 (is 2)" 13/14 validate.R: vet(INT.1, NA_integer_) [1] "`NA_integer_` should not contain NAs, but does" 13/14 validate.R: vet(INT.1, Inf) [1] "`Inf` should be type \"integer-like\" (is \"double\")" 13/14 validate.R: vet(INT.1.POS, -1) [1] "`-1` should contain only positive values, but has negatives" 13/14 validate.R: vet(INT.1.POS, 1:2) [1] "`length(1:2)` should be 1 (is 2)" 13/14 validate.R: vet(INT.1.NEG, 1) [1] "`1` should contain only negative values, but has positives" 13/14 validate.R: vet(INT.1.NEG, -(1:2)) [1] "`length(-(1:2))` should be 1 (is 2)" 13/14 validate.R: vet(INT.1.POS.STR, 0) [1] "`0` should contain only \"strictly positive\" values, but has zeroes or negatives" 13/14 validate.R: vet(INT.1.NEG.STR, 0) [1] "`0` should contain only \"strictly negative\" values, but has zeroes or positives" 13/14 validate.R: vet(INT, c(-1:1, NA_integer_)) [1] "`c(-1:1, NA_integer_)` should not contain NAs, but does" 13/14 validate.R: vet(INT, letters) [1] "`letters` should be type \"integer-like\" (is \"character\")" 13/14 validate.R: vet(INT.POS, -(1:3)) [1] "`-(1:3)` should contain only positive values, but has negatives" 13/14 validate.R: vet(INT.NEG, 1:3) [1] "`1:3` should contain only negative values, but has positives" 13/14 validate.R: vet(INT.POS.STR, 0:3) [1] "`0:3` should contain only \"strictly positive\" values, but has zeroes or negatives" 13/14 validate.R: vet(INT.NEG.STR, -(0:3)) [1] "`-(0:3)` should contain only \"strictly negative\" values, but has zeroes or positives" 13/14 validate.R: vet(NUM.1, 1.44 + 1:2) [1] "`length(1.44 + 1:2)` should be 1 (is 2)" 13/14 validate.R: vet(NUM.1.POS, -runif(1) - 1) [1] "`-runif(1) - 1` should contain only positive values, but has negatives" 13/14 validate.R: vet(NUM.1.NEG, runif(1) + 1) [1] "`runif(1) + 1` should contain only negative values, but has positives" 13/14 validate.R: vet(NUM, c(NA_real_, 1)) [1] "`c(NA_real_, 1)` should not contain NAs, but does" 13/14 validate.R: vet(NUM, NULL) [1] "`NULL` should be type \"numeric\" (is \"NULL\")" 13/14 validate.R: vet(NUM.POS, -runif(5) - 1) [1] "`-runif(5) - 1` should contain only positive values, but has negatives" 13/14 validate.R: vet(NUM.NEG, runif(5) + 1) [1] "`runif(5) + 1` should contain only negative values, but has positives" 13/14 validate.R: vet(CHR.1, letters) [1] "`length(letters)` should be 1 (is 26)" 13/14 validate.R: vet(CHR, list(1, 2, 3)) [1] "`list(1, 2, 3)` should be type \"character\" (is \"list\")" 13/14 validate.R: vet(CPX, list(1, 2, 3)) [1] "`list(1, 2, 3)` should be type \"complex\" (is \"list\")" 13/14 validate.R: vet(CPX.1, list(1, 2, 3)) [1] "`list(1, 2, 3)` should be type \"complex\" (is \"list\")" 13/14 validate.R: vet(LGL, NA) [1] "`NA` should not contain NAs, but does" 13/14 validate.R: vet(LGL, letters) [1] "`letters` should be type \"logical\" (is \"character\")" 13/14 validate.R: vet(LGL.1, 1:2 == 1:2) [1] "`length(1:2 == 1:2)` should be 1 (is 2)" 13/14 validate.R: unitizer_sect("Custom expressions", { 13/14 validate.R: vet(. > 5, 1:10) [1] "`1:10 > 5` is not all TRUE (contains non-TRUE values)" 13/14 validate.R: vet(. > 5, 6:10) [1] TRUE 13/14 validate.R: vet(.(c(TRUE, NA, TRUE)), 1:5) [1] "`c(TRUE, NA, TRUE)` is not TRUE (contains NAs)" 13/14 validate.R: vet(.(1:5), 1:5) [1] "`1:5` is not TRUE (is \"integer\" instead of a \"logical\")" 13/14 validate.R: vet(.(1:5, 1:5), 1:5) Error in vet(.(1:5, 1:5), 1:5) : `.(` must be used with only one argument. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet 13/14 validate.R: vet(.(list(1, 2, 3)), 1:3) [1] "`list(1, 2, 3)` is not TRUE (is \"list\" instead of a \"logical\")" 13/14 validate.R: vet(.(c("hello world", "goodbye moon")), 1:3) [1] "`c(\"hello world\", \"goodbye moon\")` is not TRUE (is chr [1:2]: \"hello world\" ...)" 13/14 validate.R: unitizer_sect("Compound Expressions", { 13/14 validate.R: vet(INT.1 || NULL, 1) [1] TRUE 13/14 validate.R: vet(INT.1 || NULL, NULL) [1] TRUE 13/14 validate.R: vet(INT.1 || NULL, 1.4) [1] "`1.4` should be `NULL`, or type \"integer-like\" (is \"double\")" 13/14 validate.R: vet(INT.1 || NULL || character(3L), 1) [1] TRUE 13/14 validate.R: vet(INT.1 || NULL || character(3L), 1.2) [1] "`1.2` should be `NULL`, type \"character\", or type \"integer-like\" (is \"double\")" 13/14 validate.R: vet(INT.1 || NULL || character(3L), letters) [1] "At least one of these should pass:" [2] " - `length(letters)` should be 3 (is 26)" [3] " - `letters` should be `NULL`, or type \"integer-like\" (is \"character\")" 13/14 validate.R: vet((matrix(integer(), 0) && nrow(.) == ncol(.)) || NULL, matr [1] TRUE 13/14 validate.R: vet((matrix(integer(), 0) && nrow(.) == ncol(.)) || NULL, matr [1] "At least one of these should pass:" [2] " - `matrix(1:16, nrow = 2)` should be `NULL` (is \"integer\")" [3] " - `nrow(matrix(1:16, nrow = 2)) == ncol(matrix(1:16, nrow = 2))` is not TRUE (FALSE)" 13/14 validate.R: vet((matrix(integer(), 0) && nrow(.) == ncol(.)) || NULL, matr [1] "`matrix(runif(16), nrow = 4)` should be `NULL`, or type \"integer-like\" (is \"double\")" 13/14 validate.R: exp.a <- quote(all(. > 0)) 13/14 validate.R: exp.b <- quote(is.vector(.)) 13/14 validate.R: vet(exp.a && exp.b, -(1:3)) [1] "`all(-(1:3) > 0)` is not TRUE (FALSE)" 13/14 validate.R: local({ [1] TRUE 13/14 validate.R: vet(1 || "a" || 1 || "a" || 1 || letters, 1:3) [1] "At least one of these should pass:" [2] " - `1:3` should be type \"character\" (is \"integer\")" [3] " - `length(1:3)` should be 1 (is 3)" 13/14 validate.R: unitizer_sect("Other Return Modes", { 13/14 validate.R: vet(INT.1 || NULL || LGL, "hello", format = "text") [1] "`\"hello\"` should be `NULL`, type \"integer-like\", or type \"logical\" (is \"character\")" 13/14 validate.R: vet(INT.1 || NULL || LGL, "hello", format = "raw") [1] "`\"hello\"` should be `NULL`, type \"integer-like\", or type \"logical\" (is \"character\")" 13/14 validate.R: vet(INT.1 || NULL || LGL, "hello", format = "full") [1] "For argument `current`, `\"hello\"` should be `NULL`, type \"integer-like\", or type \"logical\" (is \"character\")" 13/14 validate.R: vet(INT.1 || NULL || LGL, "hello", format = "halloween") Error in vet(INT.1 || NULL || LGL, "hello", format = "halloween") : `vet` usage error: argument `format` must be one of "text", "raw", "full" Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet 13/14 validate.R: vet(INT.1 || NULL || LGL, "hello", format = 1:10) Error in vet(INT.1 || NULL || LGL, "hello", format = 1:10) : `vet` usage error: argument `format` must be character(1L). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet 13/14 validate.R: vet(INT.1 || NULL || LGL, "hello", format = "text", stop = TRU Error in vet(INT.1 || NULL || LGL, "hello", format = "text", stop = TRUE) : `"hello"` should be `NULL`, type "integer-like", or type "logical" (is "character") Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet 13/14 validate.R: vet(INT.1 || NULL || LGL, "hello", format = "text", stop = 1:3 Error in vet(INT.1 || NULL || LGL, "hello", format = "text", stop = 1:3) : `vet` usage error: argument `stop` must be TRUE or FALSE. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet 13/14 validate.R: unitizer_sect("Multi-line Stuff", { 13/14 validate.R: vet(NO.NA, c(234234131431, 123413413413, 1341341341, 123412341 [1] "c(234234131431, 123413413413, 1341341341, 12341234134, 562456234, \n 24624624, 2452345234, 2345234524, 23452452, 2243524352, 254254234, \n 2452452435, NA)\n should not contain NAs, but does" 13/14 validate.R: vet(NO.NA || !anyNA(.), c(234234131431, 123413413413, 13413413 [1] "At least one of these should pass:" [2] " - !anyNA(c(234234131431, 123413413413, 1341341341, 12341234134, \n 562456234, 24624624, 2452345234, 2345234524, 23452452, 2243524352, \n 254254234, 2452452435, NA))\n is not TRUE (FALSE)" [3] " - c(234234131431, 123413413413, 1341341341, 12341234134, 562456234, \n 24624624, 2452345234, 2345234524, 23452452, 2243524352, 254254234, \n 2452452435, NA)\n should not contain NAs, but does" 13/14 validate.R: vet(!anyNA(.), c(234234131431, 123413413413, 1341341341, 12341 [1] "!anyNA(c(234234131431, 123413413413, 1341341341, 12341234134, \n 562456234, 24624624, 2452345234, 2345234524, 23452452, 2243524352, \n 254254234, 2452452435, NA))\nis not TRUE (FALSE)" 13/14 validate.R: vet(!anyNA(.), c(234234131431, 123413413413, NA)) [1] "`!anyNA(c(234234131431, 123413413413, NA))` is not TRUE (FALSE)" 13/14 validate.R: val.exp <- quote(!anyNA(.)) 13/14 validate.R: vet(val.exp, c(234234131431, 123413413413, NA)) [1] "`!anyNA(c(234234131431, 123413413413, NA))` is not TRUE (FALSE)" 13/14 validate.R: unitizer_sect("Embedded String Errors", { 13/14 validate.R: vet(all_bw(., 0, 1), 0:5) [1] "`all_bw(0:5, 0, 1)` is not TRUE (is chr: \"`2` at index 3 not in `[0,1]`\")" 13/14 validate.R: vet(all.equal(., 1:5), 1:6) [1] "`all.equal(1:6, 1:5)` is not TRUE (is chr: \"Numeric: lengths (6, 5) differ\")" 13/14 validate.R: unitizer_sect("Language", { 13/14 validate.R: vet(quote(quote(a + b)), quote(x2 + x3)) [1] "`quote(x2 + x3)[[1]]` should be a call to `quote` (is a call to `+`)" 13/14 validate.R: x <- quote(quote(a + b)) 13/14 validate.R: vet(x, quote(x2 + x3)) [1] TRUE 13/14 validate.R: vet(quote(a + b), quote(2 + x3)) [1] "`quote(2 + x3)[[2]]` should be \"symbol\" (is \"double\")" 13/14 validate.R: vet(quote(a + b), quote(x1 + x2 + x3)) [1] "`quote(x1 + x2 + x3)[[2]]` should be \"symbol\" (is \"language\")" 13/14 validate.R: unlist(lapply(c("aaA", "bbB", "ccC", "ddD", "eeE"), find)) character(0) 13/14 validate.R: x <- quote(aaA + bbB) 13/14 validate.R: my.env <- new.env() 13/14 validate.R: my.env$y <- quote(ccC - ddD) 13/14 validate.R: evalq(vet(quote(x * y), quote(A * (B - C))), envir = my.env) [1] "`quote(A * (B - C))[[2]]` should be a call to `+` (is \"symbol\")" 13/14 validate.R: evalq(vet(quote(eeE * y), quote(A * (B - C))), envir = my.env) [1] TRUE 13/14 validate.R: evalq(vet(quote(x * y), quote((A + D) * (B - C))), envir = my. [1] TRUE 13/14 validate.R: expA <- expB <- expC <- expD <- expE <- 0 13/14 validate.R: expA <- quote(expB && expC) 13/14 validate.R: expB <- quote(expD * expE) 13/14 validate.R: expE <- quote(expA || expD) 13/14 validate.R: vet(expA, TRUE) Error in vet(expA, TRUE) : Possible infinite recursion encountered when substituting symbol `expA`. `vetr` recursively substitutes the vetting expressions. See `vignette('vetr', package='vetr')`, "Non Standard Evaluation" section. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet 13/14 validate.R: expE <- quote(expA) 13/14 validate.R: vet(expA, TRUE) Error in vet(expA, TRUE) : Possible infinite recursion encountered when substituting symbol `expA`. `vetr` recursively substitutes the vetting expressions. See `vignette('vetr', package='vetr')`, "Non Standard Evaluation" section. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet 13/14 validate.R: . <- quote(. > 0) 13/14 validate.R: vet(.., 1.4) [1] TRUE 13/14 validate.R: . <- quote(numeric(1L)) 13/14 validate.R: vet(.., 1.5) [1] TRUE 13/14 validate.R: unitizer_sect("Errors", { 13/14 validate.R: vet(1, 1, env = "hello") Error in vet(1, 1, env = "hello") : `vet` usage error: argument `env` must be an environment (is character). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet 13/14 validate.R: unitizer_sect("Custom tokens", { 13/14 validate.R: cust.tok.1 <- vet_token(quote(TRUE), "%sshould be logical(1L)" 13/14 validate.R: vet(cust.tok.1, TRUE) [1] TRUE 13/14 validate.R: vet(cust.tok.1, 1:2) [1] "`1:2` should be type \"logical\" (is \"integer\")" 13/14 validate.R: vet_token(quote(TRUE), "should be logical(1L)") Error in vet_token(quote(TRUE), "should be logical(1L)") : Argument `err.msg` must be character(1L) and contain a single '%s' for use by `sprintf`. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet_token 13/14 validate.R: vet_token(quote(TRUE), letters) Error in vet_token(quote(TRUE), letters) : Argument `err.msg` must be character(1L) and contain a single '%s' for use by `sprintf`. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet_token 13/14 validate.R: cust.tok.2 <- quote(. > 2) 13/14 validate.R: attr(cust.tok.2, "err.msg") <- letters 13/14 validate.R: vet(cust.tok.2, TRUE) Error in vet(cust.tok.2, TRUE) : "err.msg" attribute for validation token for argument `current` must be a one length character vector. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet 13/14 validate.R: unitizer_sect("Result Buffer", { 13/14 validate.R: set1 <- vetr_settings(result.list.size.init = 1) 13/14 validate.R: vet.exp <- quote(1 || 1:2 || 1:3 || 1:4 || 1:5 || 1:6 || 1:7 | 13/14 validate.R: vet(vet.exp, 1:8, settings = set1) [1] TRUE 13/14 validate.R: vet(vet.exp, 1:9, settings = set1) [1] "`length(1:9)` should be 1, 2, 3, 4, 5, 6, 7, or 8 (is 9)" 13/14 validate.R: set2 <- vetr_settings(result.list.size.init = 1, result.list.s 13/14 validate.R: vet(vet.exp, 1:8, settings = set2) Error in vet(vet.exp, 1:8, settings = set2) : Reached maximum vet token result buffer size (7); this should only happen if you have more than that number of tokens compounded with `||`. If that is the case, see description of `result.list.size` parameter for `?vetr_settings`. If not, contact maintainer. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet 13/14 validate.R: vet(vet.exp, 1:9, settings = set2) Error in vet(vet.exp, 1:9, settings = set2) : Reached maximum vet token result buffer size (7); this should only happen if you have more than that number of tokens compounded with `||`. If that is the case, see description of `result.list.size` parameter for `?vetr_settings`. If not, contact maintainer. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet 13/14 validate.R: set3 <- vetr_settings(result.list.size.init = 1, result.list.s 13/14 validate.R: vet(vet.exp, 1:8, settings = set3) [1] TRUE 13/14 validate.R: vet(vet.exp, 1:9, settings = set3) [1] "`length(1:9)` should be 1, 2, 3, 4, 5, 6, 7, or 8 (is 9)" 13/14 validate.R: set4 <- vetr_settings(result.list.size.init = "hello", result. 13/14 validate.R: set5 <- vetr_settings(result.list.size.init = 1, result.list.s 13/14 validate.R: vet(1, 1, settings = set4) Error in vet(1, 1, settings = set4) : Setting `result.list.size.init` must be integer-like (is character). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet 13/14 validate.R: vet(1, 1, settings = set5) Error in vet(1, 1, settings = set5) : Setting `result.list.size.max` must be integer-like (is character). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet 13/14 validate.R: unitizer_sect("pkg::fun calls (issue #100)", { 13/14 validate.R: vet(base::sum(.), 1:10) [1] "{base::sum(1:10)} is not TRUE (is \"integer\" instead of a \"logical\")" 13/14 validate.R: vet((base::.)(identity), is.function) [1] TRUE 13/14 validate.R: vet((base::.)(identity), is.integer) [1] "{base::is.integer(identity)} is not TRUE (FALSE)" 13/14 validate.R: unitizer_sect("promises (issue #106)", { 13/14 validate.R: env1 <- new.env() 13/14 validate.R: delayedAssign("x", stop("error 1"), assign.env = env1) 13/14 validate.R: env2 <- new.env() 13/14 validate.R: delayedAssign("x", stop("error 2"), assign.env = env2) 13/14 validate.R: env0 <- list2env(list(x = TRUE), new.env()) 13/14 validate.R: vet(env1, env0) Error in vet(env1, env0) : error 1 Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet 13/14 validate.R: vet(env0, env2) Error in vet(env0, env2) : error 2 Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet 14/14 validate.args.R: 14/14 validate.args.R: library(vetr) 14/14 validate.args.R: unitizer_sect("Single template validation", { 14/14 validate.args.R: fun0 <- function(x, y, z) vetr(x = matrix(integer(), ncol 14/14 validate.args.R: fun0(1, 2, 3) Error in fun0(x = 1, y = 2, z = 3) : For argument `x`, `1` should be "matrix" (is "numeric") Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun0 -> vetr 14/14 validate.args.R: fun0(matrix(1), 2, 3) Error in fun0(x = matrix(1), y = 2, z = 3) : For argument `x`, `matrix(1)` should have 3 columns (has 1) Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun0 -> vetr 14/14 validate.args.R: fun0(matrix(1:3, nrow = 1), 2, 3) Error in fun0(x = matrix(1:3, nrow = 1), y = 2, z = 3) : For argument `y`, `length(2)` should be 2 (is 1) Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun0 -> vetr 14/14 validate.args.R: fun0(matrix(1:3, nrow = 1), 2:3, 3) Error in fun0(x = matrix(1:3, nrow = 1), y = 2:3, z = 3) : For argument `z`, `3` should be type "logical" (is "double") Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun0 -> vetr 14/14 validate.args.R: fun0(matrix(1:3, nrow = 1), c(2, 3), 3) Error in fun0(x = matrix(1:3, nrow = 1), y = c(2, 3), z = 3) : For argument `z`, `3` should be type "logical" (is "double") Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun0 -> vetr 14/14 validate.args.R: fun0(matrix(1:3, nrow = 1), c(2, 3), TRUE) [1] TRUE 14/14 validate.args.R: unitizer_sect("Multi-template validation", { 14/14 validate.args.R: fun1 <- function(x, y, z) vetr(x = matrix(integer(), ncol 14/14 validate.args.R: fun1(1:3, "fail", "fail") Error in fun1(x = 1:3, y = "fail", z = "fail") : For argument `y`, `"fail"` should be `NULL`, type "integer-like", or type "logical" (is "character") Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun1 -> vetr 14/14 validate.args.R: fun1(matrix(1:9, ncol = 3), "fail", "fail") Error in fun1(x = matrix(1:9, ncol = 3), y = "fail", z = "fail") : For argument `y`, `"fail"` should be `NULL`, type "integer-like", or type "logical" (is "character") Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun1 -> vetr 14/14 validate.args.R: fun1(letters[1:3], "fail", "fail") Error in fun1(x = letters[1:3], y = "fail", z = "fail") : For argument `x`, `letters[1:3]` should be "matrix", or type "integer-like" (is "character") Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun1 -> vetr 14/14 validate.args.R: fun1(1:3, 1:2, "fail") Error in fun1(x = 1:3, y = 1:2, z = "fail") : For argument `z`, `"fail"` should be type "logical" (is "character") Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun1 -> vetr 14/14 validate.args.R: fun1(1:3, NULL, "fail") Error in fun1(x = 1:3, y = NULL, z = "fail") : For argument `z`, `"fail"` should be type "logical" (is "character") Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun1 -> vetr 14/14 validate.args.R: fun1(1:3, FALSE, "fail") Error in fun1(x = 1:3, y = FALSE, z = "fail") : For argument `z`, `"fail"` should be type "logical" (is "character") Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun1 -> vetr 14/14 validate.args.R: fun1(1:3, FALSE, FALSE) [1] TRUE 14/14 validate.args.R: unitizer_sect("Template and Straight Eval", { 14/14 validate.args.R: fun2 <- function(x, y, z) vetr(x = (matrix(integer(), nco 14/14 validate.args.R: fun2(matrix(c(1:8, NA), nrow = 3), NULL, NULL) Error in fun2(x = matrix(c(1:8, NA), nrow = 3), y = NULL, z = NULL) : For argument `x`, `!any(is.na(matrix(c(1:8, NA), nrow = 3)))` is not TRUE (FALSE) Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun2 -> vetr 14/14 validate.args.R: fun2(matrix(c(1:9), nrow = 3), -1:1, NULL) Error in fun2(x = matrix(c(1:9), nrow = 3), y = -1:1, z = NULL) : For argument `y`, `all(-1:1 > 0)` is not TRUE (FALSE) Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun2 -> vetr 14/14 validate.args.R: fun2(matrix(c(1:9), nrow = 3), 1:3, NA) Error in fun2(x = matrix(c(1:9), nrow = 3), y = 1:3, z = NA) : For argument `z`, `!is.na(NA)` is not TRUE (FALSE) Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun2 -> vetr 14/14 validate.args.R: fun2(matrix(c(1:9), nrow = 3), 1:3, TRUE) [1] TRUE 14/14 validate.args.R: unitizer_sect("Complex OR outcomes", { 14/14 validate.args.R: fun2a <- function(x) vetr(x = setNames(character(3L), let 14/14 validate.args.R: fun2a(letters[1:3]) Error in fun2a(x = letters[1:3]) : For argument `x` at least one of these should pass: - `letters[1:3]` should be "matrix", or type "list" (is "character") - `letters[1:3]` should have attribute "names" Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun2a -> vetr 14/14 validate.args.R: unitizer_sect("Errors in Arguments", { 14/14 validate.args.R: fun3 <- function(x, y) vetr(x = logical(1L), y = integer( 14/14 validate.args.R: fun3(stop("boom")) Error: boom Error in fun3(x = stop("boom")) : Argument `x` produced error during evaluation; see previous error. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun3 -> vetr 14/14 validate.args.R: fun3(TRUE, stop("boomBOOM")) Error: boomBOOM Error in fun3(x = TRUE, y = stop("boomBOOM")) : Argument `y` produced error during evaluation; see previous error. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun3 -> vetr 14/14 validate.args.R: fun3(1:3, stop("boomBOOM")) Error in fun3(x = 1:3, y = stop("boomBOOM")) : For argument `x`, `1:3` should be type "logical" (is "integer") Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun3 -> vetr 14/14 validate.args.R: fun4 <- function(x, y) vetr(x = stop("BOOM"), y = integer 14/14 validate.args.R: fun4(NULL, 1:3) Error: BOOM Error in vetr(x = stop("BOOM"), y = integer(3L)) : Validation expression for argument `x` produced an error (see previous error). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun4 -> vetr 14/14 validate.args.R: fun5 <- function(x, y) vetr(x = integer(3L), y = NULL || 14/14 validate.args.R: fun5(1:3, NULL) [1] TRUE 14/14 validate.args.R: fun5(1:2, NULL) Error in fun5(x = 1:2, y = NULL) : For argument `x`, `length(1:2)` should be 3 (is 2) Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun5 -> vetr 14/14 validate.args.R: fun6 <- function(x, y) vetr(x = integer(3L), y = NULL && 14/14 validate.args.R: fun6(1:3, NULL) Error: hah Error in vetr(x = integer(3L), y = NULL && .(stop("hah"))) : Validation expression for argument `y` produced an error (see previous error). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun6 -> vetr 14/14 validate.args.R: unitizer_sect("Args evaled in correct env?", { 14/14 validate.args.R: fun7 <- function(x, y = z + 2) { 14/14 validate.args.R: fun7a <- function(x, y = z + 2) { 14/14 validate.args.R: z <- 1 14/14 validate.args.R: fun7(TRUE) Error in z + 2 : non-numeric argument to binary operator Error in fun7(x = TRUE) : Argument `y` produced error during evaluation; see previous error. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun7 -> vetr 14/14 validate.args.R: fun7a(TRUE) [1] TRUE 14/14 validate.args.R: fun8 <- function(x, y = z + 2) { 14/14 validate.args.R: fun8a <- function(x, y = z + 2) { 14/14 validate.args.R: a <- NULL 14/14 validate.args.R: b <- TRUE 14/14 validate.args.R: fun8(a && b) Error in a && b : invalid 'x' type in 'x && y' Error in fun8(x = a && b) : Argument `x` produced error during evaluation; see previous error. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun8 -> vetr 14/14 validate.args.R: a <- TRUE 14/14 validate.args.R: fun8a(a && b) [1] TRUE 14/14 validate.args.R: fun_make <- function() { 14/14 validate.args.R: fun <- fun_make() 14/14 validate.args.R: a <- b <- 1:9 14/14 validate.args.R: local({ Error in fun(x = a) : For argument `x`, `a` should be "matrix" (is "character") Calls: local ... eval.parent -> eval -> eval -> eval -> eval -> fun -> vetr 14/14 validate.args.R: local({ Error in fun(x = b) : For argument `x`, `b` should be "matrix" (is "character") Calls: local ... eval.parent -> eval -> eval -> eval -> eval -> fun -> vetr 14/14 validate.args.R: fun8b <- function(x) vetr(x = length(.) > 0 && integer()) 14/14 validate.args.R: get("zfqwefkj") Error in get("zfqwefkj") : object 'zfqwefkj' not found Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> get 14/14 validate.args.R: local({ [1] TRUE 14/14 validate.args.R: unitizer_sect("Compound Expression Scope Issues", { 14/14 validate.args.R: a <- quote(!anyNA(.)) 14/14 validate.args.R: fun <- function(x) { 14/14 validate.args.R: fun(-(1:3)) Error in fun(x = -(1:3)) : For argument `x`, `all(-(1:3) > 0)` is not TRUE (FALSE) Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun -> vetr 14/14 validate.args.R: unitizer_sect("Non-equal args and validation exps", { 14/14 validate.args.R: fun8 <- function(x = "hello", y = TRUE, z) vetr(x = integ 14/14 validate.args.R: fun8(1L, NULL, 1:2) [1] TRUE 14/14 validate.args.R: fun8(1L, 1:2, NULL) Error in fun8(x = 1L, y = 1:2, z = NULL) : For argument `z`, `NULL` should be type "integer-like" (is "NULL") Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun8 -> vetr 14/14 validate.args.R: fun8(1L, 1:2) Error in fun8(x = 1L, y = 1:2) : argument `z` is missing, with no default Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun8 -> vetr 14/14 validate.args.R: fun8(1L) Error in fun8(x = 1L) : argument `z` is missing, with no default Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun8 -> vetr 14/14 validate.args.R: fun8(z = 1:2) Error in fun8(z = 1:2) : For argument `x`, `"hello"` should be type "integer-like" (is "character") Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun8 -> vetr 14/14 validate.args.R: unitizer_sect("Referencing argument in vet exp error", { 14/14 validate.args.R: fun1 <- function(x, y) vetr(x > 0, . < 3) 14/14 validate.args.R: fun1(1:10, 1:10) Error in vetr(x > 0, . < 3) : vet/vetr usage error: found symbol `x` in vetting token for object with the same symbol. Please use `.` to reference the object being checked by the vetting token (e.g. use `vet(. > 0, x)` instead of `vet(x > 0, x)`) Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun1 -> vetr 14/14 validate.args.R: fun2 <- function(x, y) vetr(. > 0 && all(y > 0), y < 3) 14/14 validate.args.R: fun2(TRUE, 1:10) Error in vetr(. > 0 && all(y > 0), y < 3) : vet/vetr usage error: found symbol `y` in vetting token for object with the same symbol. Please use `.` to reference the object being checked by the vetting token (e.g. use `vet(. > 0, x)` instead of `vet(x > 0, x)`) Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun2 -> vetr 14/14 validate.args.R: x <- 1:10 14/14 validate.args.R: vet(x > 0, x) Error in vet(x > 0, x) : vet/vetr usage error: found symbol `x` in vetting token for object with the same symbol. Please use `.` to reference the object being checked by the vetting token (e.g. use `vet(. > 0, x)` instead of `vet(x > 0, x)`) Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet 14/14 validate.args.R: vet((x + 1) > 0, x + 1) [1] "`x + 1` should be type \"logical\" (is \"double\")" 14/14 validate.args.R: unitizer_sect("Default arg mix-up", { 14/14 validate.args.R: fun10a <- function(x, y = TRUE, z = 999) vetr(INT, LGL.1, 14/14 validate.args.R: fun10a(1, z = 1:3) Error in fun10a(x = 1, z = 1:3) : For argument `z`, `length(1:3)` should be 1 (is 3) Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun10a -> vetr 14/14 validate.args.R: fun10b <- function(x, y = TRUE, z = 999) vetr(INT, z = IN 14/14 validate.args.R: fun10b(1, z = 1:3) Error in fun10b(x = 1, z = 1:3) : For argument `z`, `length(1:3)` should be 1 (is 3) Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun10b -> vetr 14/14 validate.args.R: unitizer_sect("Dots", { 14/14 validate.args.R: f <- function(x, y = 1L, z = 1L, ...) vetr(1L, 1L, 1L) 14/14 validate.args.R: f(2L, w = 3L) [1] TRUE 14/14 validate.args.R: f <- function(x, y = 1L, ...) vetr(1L, 1L, 1L) 14/14 validate.args.R: f(2L, z = 3L) Warning in vetr(1L, 1L, 1L) : `...` vetting is not supported. [1] TRUE 14/14 validate.args.R: unitizer_sect("Don't access promises in environments", { 14/14 validate.args.R: fenv <- function(env) vetr(environment()) 14/14 validate.args.R: env <- FALSE 14/14 validate.args.R: fenv(environment()) Error in fenv(env = environment()) : For argument `env`, `environment()$env` should be type "environment" (is "logical") Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fenv -> vetr 14/14 validate.args.R: unitizer_sect("Invocation via `do.call` (#109)", { 14/14 validate.args.R: f <- function(x) vetr(is.function(.)) 14/14 validate.args.R: do.call(f, list(mean)) [1] TRUE Prepping Unitizers... Warning in history_capt(history, interactive.mode) : Unable to capture history in non-interactive mode. | Summary of files in common directory 'unitizer': | | Pass Fail | 1. abstract.R 35 - | *2. alike.R 196 2 | 3. all-bw.R 207 - | 4. classes.R 22 - | 5. cstringr.R 82 - | 6. eval.R 30 - | *7. internal.R 185 2 | 8. language.R 55 - | 9. misc.R 17 - | 10. parse.R 49 - | 11. tev.R 2 - | 12. type.R 41 - | 13. validate.R 117 - | 14. validate.args.R 49 - | ............................... | 1087 4 | Legend: | * `unitizer` requires review +------------------------------------------------------------------------------+ | unitizer for: unitizer/alike.R | +------------------------------------------------------------------------------+ Pass Fail Atomic 13 - lists 12 - NULL values as wildcards 5 - Matrix / Arrays 11 - Data Frames 15 - Time Series 6 - Factors 5 - Environments / Pairlists 17 - Calls / Formulas 37 - Functions 6 1 settings 17 1 Examples 30 - Raw 1 - Errors 8 - Attributes 13 - .................................... 196 2 = Functions ==================================================================== - Failed ----------------------------------------------------------------------- | The following test failed because the new evaluation does not match the | reference value from the store. Overwrite with new result ([Y]es, [N]o, | [P]rev, [B]rowse, [R]erun, [QQ]uit All, [Q]uit, [H]elp)? # TRUE > alike(`&&`, function() NULL) | Value mismatch: < .ref > .new @@ 1 @@ @@ 1 @@ < [1] TRUE > NULL | Conditions mismatch: < .REF$conditions > .NEW$conditions @@ 1 / 1,3 @@ < Empty condition list > Condition list with 1 condition: > 1. Error in alike(`&&`, function() NULL) : argument of type NILSXP is not a > closure | State mismatch; see `.DIFF$state` for details. = settings ===================================================================== - Failed ----------------------------------------------------------------------- | The following test failed because the new evaluation does not match the | reference value from the store. Overwrite with new result ([Y]es, [N]o, | [P]rev, [B]rowse, [R]erun, [QQ]uit All, [Q]uit, [H]elp)? # FALSE > alike(`&&`, function() NULL, settings = vetr_settings(type.mode = 1)) | Value mismatch: < .ref > .new @@ 1 @@ @@ 1 @@ < [1] "`function() NULL` should be type > NULL : \"special\" (is \"closure\")" ~ | Conditions mismatch: < .REF$conditions > .NEW$conditions @@ 1 / 1,3 @@ < Empty condition list > Condition list with 1 condition: > 1. Error in alike(`&&`, function() NULL, settings = vetr_settings(type.mode = > 1)) : argument of type NILSXP is not a closure | State mismatch; see `.DIFF$state` for details. | User input required to proceed, but we are in non-interactive mode. | unitizer unchanged. +------------------------------------------------------------------------------+ | unitizer for: unitizer/internal.R | +------------------------------------------------------------------------------+ Pass Fail Name like attributes 6 - S3 Classes 12 - Dimnames 25 - Dims 18 - Time Series 9 - All Attributes, default 20 - All attributes, strict 13 - Closures 23 2 Env Track 4 - valid names 10 - Is dfish 3 - syntactic 9 - Pad or Quote 4 - Merge messages 10 - Hash 10 - Mode 6 - Find funs 3 - ................................... 185 2 = Closures ===================================================================== - Failed ----------------------------------------------------------------------- | The 2 tests in this section failed because the new evaluations do not match | the reference values from the store. Overwrite with new results ([Y]es, [N]o, | [P]rev, [B]rowse, [R]erun, [QQ]uit All, [Q]uit, [H]elp)? # FALSE, argless specials > vetr:::fun_alike(`[`, substitute) | Value mismatch: < .ref > .new @@ 1,2 @@ @@ 1 @@ < [1] "not have" "any arguments" > NULL < [3] "" "" ~ | Conditions mismatch: < .REF$conditions > .NEW$conditions @@ 1 / 1,3 @@ < Empty condition list > Condition list with 1 condition: > 1. Error in vetr:::fun_alike(`[`, substitute) : argument of type NILSXP is not > a closure | State mismatch; see `.DIFF$state` for details. # TRUE, argless specials > vetr:::fun_alike(`[`, `&&`) | Value mismatch: < .ref > .new @@ 1 @@ @@ 1 @@ < [1] TRUE > NULL | Conditions mismatch: < .REF$conditions > .NEW$conditions @@ 1 / 1,3 @@ < Empty condition list > Condition list with 1 condition: > 1. Error in vetr:::fun_alike(`[`, `&&`) : argument of type NILSXP is not a > closure | State mismatch; see `.DIFF$state` for details. | User input required to proceed, but we are in non-interactive mode. | unitizer unchanged. | * Fail: alike(`&&`, function() NULL) | * Fail: alike(`&&`, function() NULL, settings = vetr_settings(type.mode = | 1)) | in 'unitizer/alike.R' | * Fail: vetr:::fun_alike(`[`, substitute) | * Fail: vetr:::fun_alike(`[`, `&&`) | in 'unitizer/internal.R' | Newly evaluated tests do not match unitizer (Pass: 1087, Fail: 4); see above | for more info, or run in interactive mode. | Running in transcript mode: only stderr text that is also part of a signalled | condition is in the test review section (scroll up to the evaluation section | for the rest). See `transcript` parameter in `?unitize`. Error in unitize_core(test.files = test.files, store.ids = store.ids, : Cannot proceed in non-interactive mode. Calls: local ... eval -> eval -> eval -> unitize_dir -> unitize_core Execution halted Flavor: r-devel-linux-x86_64-fedora-clang

Version: 0.2.16
Check: tests
Result: ERROR Running ‘run.R’ [48s/90s] Running the tests in ‘tests/run.R’ failed. Complete output: > cat(getwd(), "\n") /data/gannet/ripley/R/packages/tests-devel/vetr.Rcheck/tests > if(suppressWarnings(require('unitizer'))) { + local({ + suppressWarnings(RNGversion("3.5.2")); + on.exit({ + RNGversion(as.character(getRversion())) + }) + pattern <- 'alike' + unitize_dir( + 'unitizer', + # pattern=pattern, + state='recommended' + ) + }) + } else { + warning("Cannot run tests without package `unitizer`") + } Loading required package: unitizer State tracking is disabled by default to comply with CRAN policies. Add `options(unitizer.state='suggested')` to your 'Rprofile' file to enable, or `options(unitizer.state='off')` to quash this message without enabling. Prior to enabling, be sure to read `?unitizerState`,in particular the 'CRAN non-compliance' section. Preloads... Loading unitizer data... Parsing tests... Parsing unitizer/abstract.R Parsing unitizer/alike.R Parsing unitizer/all-bw.R Parsing unitizer/classes.R Parsing unitizer/cstringr.R Parsing unitizer/eval.R Parsing unitizer/internal.R Parsing unitizer/language.R Parsing unitizer/misc.R Parsing unitizer/parse.R Parsing unitizer/tev.R Parsing unitizer/type.R Parsing unitizer/validate.R Parsing unitizer/validate.args.R Evaluating tests... 1/14 abstract.R: 1/14 abstract.R: library(vetr) 1/14 abstract.R: unitizer_sect("Standard Methods", { 1/14 abstract.R: abstract(1:10) integer(0) 1/14 abstract.R: abstract(list(a = 1:10, b = runif(10))) $a integer(0) $b numeric(0) 1/14 abstract.R: abstract(matrix(1:9, nrow = 3)) <0 x 0 matrix> 1/14 abstract.R: abstract(array(1:8, c(2, 2, 2), dimnames = list(letters[1:2], <0 x 0 x 0 array of integer> 1/14 abstract.R: list.arr <- replicate(8, list(1), simplify = FALSE) 1/14 abstract.R: dim(list.arr) <- rep(2, 3) 1/14 abstract.R: abstract(list.arr) <0 x 0 x 0 array of character> 1/14 abstract.R: abstract(list(1, NULL)) [[1]] numeric(0) [[2]] NULL 1/14 abstract.R: alike(abstract(iris), iris[1:10, ]) [1] TRUE 1/14 abstract.R: alike(abstract(iris), iris[1:10, 1:3]) [1] "`iris[1:10, 1:3]` should have 5 columns (has 3)" 1/14 abstract.R: alike(abstract(iris), transform(iris, Species = as.character(S [1] "`transform(iris, Species = as.character(Species))$Species` should be class \"factor\" (is \"character\")" 1/14 abstract.R: my.env <- new.env() 1/14 abstract.R: identical(my.env, abstract(my.env)) [1] TRUE 1/14 abstract.R: unitizer_sect("Time Series", { 1/14 abstract.R: y <- ts(runif(12), start = 1970, frequency = 12) 1/14 abstract.R: attr(abstract(y), "tsp") [1] 0 0 0 1/14 abstract.R: attr(abstract(y, "start"), "tsp") [1] 0.000 1970.917 12.000 1/14 abstract.R: attr(abstract(y, "end"), "tsp") [1] 1970 0 12 1/14 abstract.R: attr(abstract(y, "frequency"), "tsp") [1] 1970.000 1970.917 0.000 1/14 abstract.R: attr(abstract(y, c("start", "frequency")), "tsp") [1] 0.000 1970.917 0.000 1/14 abstract.R: abstract(y, "boom") Error in abstract.ts(y, "boom") : Argument `what` must be character with all values in c("start", "end", "frequency") Calls: local ... eval -> eval -> withVisible -> abstract -> abstract.ts 1/14 abstract.R: vetr:::abstract.ts(1:12) Error in vetr:::abstract.ts(1:12) : Argument `x` must have a "tsp" attribute that is numeric(3L) Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 1/14 abstract.R: unitizer_sect("s4", { 1/14 abstract.R: obj <- new("unitizerGlobalState") 1/14 abstract.R: abstract(obj) An object of class "unitizerGlobalState" Slot "search.path": NULL Slot "options": NULL Slot "working.directory": NULL Slot "random.seed": NULL Slot "namespaces": NULL 1/14 abstract.R: nullify(obj, 1) Error in as.list.default(obj) : no method for coercing this S4 class to a vector Error in nullify.default(obj, 1) : Could not coerce `obj` to list; see previous error. Calls: local ... eval -> eval -> withVisible -> nullify -> nullify.default 1/14 abstract.R: unitizer_sect("lm", { 1/14 abstract.R: set.seed(1) 1/14 abstract.R: df1 <- data.frame(x = runif(10), y = runif(10), z = runif(10)) 1/14 abstract.R: df2 <- data.frame(a = runif(5), b = runif(5), c = runif(5)) 1/14 abstract.R: mdl <- lm(y ~ x + poly(z, 2), df1) 1/14 abstract.R: alike(abstract(mdl), mdl) [1] TRUE 1/14 abstract.R: mdl2 <- lm(x ~ y + poly(z, 2), df1) 1/14 abstract.R: alike(abstract(mdl), mdl2) [1] TRUE 1/14 abstract.R: mdl3 <- lm(a ~ b + log(c), df2) 1/14 abstract.R: alike(abstract(mdl), mdl3) [1] "`mdl3$terms[[3]][[3]][[1]]` should be a call to `poly` (is a call to `log`)" 1/14 abstract.R: mdl4 <- lm(a ~ b, df2) 1/14 abstract.R: alike(abstract(mdl), mdl4) [1] "`mdl4$terms[[3]]` should be a call to `+` (is \"symbol\")" 1/14 abstract.R: unitizer_sect("nullify", { 1/14 abstract.R: nullify(list(1, 2, 3), 2) [[1]] [1] 1 [[2]] NULL [[3]] [1] 3 1/14 abstract.R: nullify(list(1, 2, 3), -2) Error in nullify.default(list(1, 2, 3), -2) : Argument `index` must be a valid subsetting index and if numeric must be greater than or equal to one. Calls: local ... eval -> eval -> withVisible -> nullify -> nullify.default 1/14 abstract.R: nullify(list(1, 2, 3, 4), c(TRUE, FALSE)) [[1]] NULL [[2]] [1] 2 [[3]] NULL [[4]] [1] 4 1/14 abstract.R: nullify(list(1, 2, 3, 4), c(TRUE, FALSE, FALSE)) Warning in nullify.default(list(1, 2, 3, 4), c(TRUE, FALSE, FALSE)) : Argument `obj` is not a multiple in length of argument `obj` [[1]] NULL [[2]] [1] 2 [[3]] [1] 3 [[4]] NULL 1/14 abstract.R: nullify(list(1, 2, 3, 4), c(rep(FALSE, 4), TRUE)) Error in nullify.default(list(1, 2, 3, 4), c(rep(FALSE, 4), TRUE)) : Argument `index` may be no longer than `obj` if it is logical. Calls: local ... eval -> eval -> withVisible -> nullify -> nullify.default 1/14 abstract.R: nullify(list(a = 1, b = 2, 3, 4), c("a", "b")) $a NULL $b NULL [[3]] [1] 3 [[4]] [1] 4 1/14 abstract.R: nullify(list(1, 2, 3, 4), "hello") Error in nullify.default(list(1, 2, 3, 4), "hello") : Argument `index` contains values not present in names of `obj` (hello). Calls: local ... eval -> eval -> withVisible -> nullify -> nullify.default 1/14 abstract.R: nullify(list(1, 2, 3), 4) Error in nullify.default(list(1, 2, 3), 4) : Argument `index` can only contain values that exist within seq_along(`obj`). Calls: local ... eval -> eval -> withVisible -> nullify -> nullify.default 1/14 abstract.R: iris.null <- nullify(iris[1:10, ], 4) 1/14 abstract.R: as.list(iris.null) $Sepal.Length [1] 5.1 4.9 4.7 4.6 5.0 5.4 4.6 5.0 4.4 4.9 $Sepal.Width [1] 3.5 3.0 3.2 3.1 3.6 3.9 3.4 3.4 2.9 3.1 $Petal.Length [1] 1.4 1.4 1.3 1.5 1.4 1.7 1.4 1.5 1.4 1.5 $Petal.Width NULL $Species [1] setosa setosa setosa setosa setosa setosa setosa setosa setosa setosa Levels: setosa versicolor virginica 1/14 abstract.R: class(iris.null) [1] "data.frame" 1/14 abstract.R: nullify(letters, 5) [1] "a" "b" "c" "d" "NULL" "f" "g" "h" "i" "j" [11] "k" "l" "m" "n" "o" "p" "q" "r" "s" "t" [21] "u" "v" "w" "x" "y" "z" 1/14 abstract.R: nullify(structure(letters[1:2], class = "xqwer892jahaksdf"), Warning in nullify.default(structure(letters[1:2], class = "xqwer892jahaksdf"), : Unable to convert object back to class "xqwer892jahaksdf" [[1]] [1] "a" [[2]] NULL 2/14 alike.R: 2/14 alike.R: library(vetr) 2/14 alike.R: unitizer_sect("Atomic", { 2/14 alike.R: alike(integer(), 1:3) [1] TRUE 2/14 alike.R: alike(integer(5L), 1:3) [1] "`length(1:3)` should be 5 (is 3)" 2/14 alike.R: alike(integer(3L), 1:3) [1] TRUE 2/14 alike.R: alike(numeric(), c(1, 2, 3)) [1] TRUE 2/14 alike.R: alike(numeric(), 1L) [1] TRUE 2/14 alike.R: alike(numeric(), c(1.1, 0.053, 41.8)) [1] TRUE 2/14 alike.R: alike(integer(3L), 1:3 + 0.01) [1] "`1:3 + 0.01` should be type \"integer-like\" (is \"double\")" 2/14 alike.R: alike(integer(6L), seq(1/6, 1, 1/6) * 6) [1] "`seq(1/6, 1, 1/6) * 6` should be type \"integer-like\" (is \"double\")" 2/14 alike.R: alike(integer(4L), letters[1:4]) [1] "`letters[1:4]` should be type \"integer-like\" (is \"character\")" 2/14 alike.R: alike(letters[1:4], c("hello", "goodbye", "ba", "da")) [1] TRUE 2/14 alike.R: alike(integer(), NULL) [1] "`NULL` should be type \"integer-like\" (is \"NULL\")" 2/14 alike.R: alike(c(a = 1, b = 2), 3) [1] "`length(3)` should be 2 (is 1)" 2/14 alike.R: alike(c(a = 1, b = 2), c(1, 2)) [1] "`c(1, 2)` should have attribute \"names\"" 2/14 alike.R: unitizer_sect("lists", { 2/14 alike.R: lst <- list(list(1, 2), list(3, list(4, list(5, list(6, 6.1, 2/14 alike.R: lst.2 <- list(list(11, 21), list(31, list(41, list(51, list(61))) 2/14 alike.R: alike(lst, lst.2) [1] "`length(lst.2[[2]][[2]][[2]][[2]])` should be 3 (is 1)" 2/14 alike.R: lst.3 <- lst.2 2/14 alike.R: lst.3[[2]][[2]][[2]][[2]] <- matrix(1:9, nrow = 3) 2/14 alike.R: alike(lst, lst.3) [1] "`lst.3[[2]][[2]][[2]][[2]]` should be type \"list\" (is \"integer\")" 2/14 alike.R: alike(1:10, "hello") [1] "`\"hello\"` should be type \"integer-like\" (is \"character\")" 2/14 alike.R: alike(lst, lst) [1] TRUE 2/14 alike.R: lst.4 <- lst 2/14 alike.R: lst.4[[2]][[2]] <- list() 2/14 alike.R: alike(lst.4, lst) [1] TRUE 2/14 alike.R: alike(lst, lst.4) [1] "`length(lst.4[[2]][[2]])` should be 2 (is 0)" 2/14 alike.R: lst.5 <- list(1, list(a = 1, b = 2, c = list(d = 1))) 2/14 alike.R: lst.6 <- list(1, list(a = 1, b = 2, c = list(d = "hello"))) 2/14 alike.R: lst.5.1 <- list(1, list(a = 1, b = 2, `c d` = list(d = 1))) 2/14 alike.R: lst.6.1 <- list(1, list(a = 1, b = 2, `c d` = list(d = "hello"))) 2/14 alike.R: alike(lst.5, lst.6) [1] "`lst.6[[2]]$c$d` should be type \"numeric\" (is \"character\")" 2/14 alike.R: alike(lst.6, lst.5) [1] "`lst.5[[2]]$c$d` should be type \"character\" (is \"double\")" 2/14 alike.R: alike(lst.5.1, lst.6.1) [1] "{lst.6.1[[2]]$`c d`$d} should be type \"numeric\" (is \"character\")" 2/14 alike.R: alike(lst.6.1, lst.5.1) [1] "{lst.5.1[[2]]$`c d`$d} should be type \"character\" (is \"double\")" 2/14 alike.R: alike(pairlist(a = 1, b = "character"), pairlist(a = 1, b = lette [1] "`length(pairlist(a = 1, b = letters)$b)` should be 1 (is 26)" 2/14 alike.R: alike(pairlist(1, "character"), pairlist(1, letters)) [1] "`length(pairlist(1, letters)[[2]])` should be 1 (is 26)" 2/14 alike.R: unitizer_sect("NULL values as wildcards", { 2/14 alike.R: alike(NULL, 1:3) [1] "`1:3` should be `NULL` (is \"integer\")" 2/14 alike.R: alike(list(NULL), list(1:3)) [1] TRUE 2/14 alike.R: alike(list(NULL, NULL), list(list(list(1, 2, 3)), 1:25)) [1] TRUE 2/14 alike.R: alike(list(NULL), list(1, 2)) [1] "`length(list(1, 2))` should be 1 (is 2)" 2/14 alike.R: alike(list(), list(1, 2)) [1] TRUE 2/14 alike.R: unitizer_sect("Matrix / Arrays", { 2/14 alike.R: alike(matrix(integer(), ncol = 7), matrix(1:21, nrow = 3)) [1] TRUE 2/14 alike.R: alike(matrix(integer(), nrow = 3), matrix(1:21, nrow = 3)) [1] TRUE 2/14 alike.R: alike(matrix(character(), nrow = 3), matrix(1:21, nrow = 3)) [1] "`matrix(1:21, nrow = 3)` should be type \"character\" (is \"integer\")" 2/14 alike.R: alike(matrix(integer(), nrow = 4), matrix(1:21, nrow = 3)) [1] "`matrix(1:21, nrow = 3)` should have 4 rows (has 3)" 2/14 alike.R: alike(matrix(integer(), ncol = 3, dimnames = list(NULL, c("R", [1] TRUE 2/14 alike.R: alike(matrix(integer(), nrow = 3, dimnames = list(c("R", "G", [1] "`matrix(1:21, ncol = 3, dimnames = list(NULL, c(\"R\", \"G\", \"B\")))` should have 3 rows (has 7)" 2/14 alike.R: alike(matrix(integer(), nrow = 3, dimnames = list(c("R", "G", [1] "row.names(matrix(1:9, nrow = 3, dimnames = list(NULL, c(\"R\", \n \"G\", \"B\"))))\nshould be type \"character\" (is \"NULL\")" 2/14 alike.R: alike(matrix(integer(), nrow = 3, dimnames = list(c("R", "G", [1] TRUE 2/14 alike.R: alike(matrix(1:9, nrow = 3), 1:9) [1] "`1:9` should be \"matrix\" (is \"integer\")" 2/14 alike.R: mx.tpl <- matrix(integer(), ncol = 3, dimnames = list(row.id = NU 2/14 alike.R: mx.cur <- matrix(sample(0:255, 12), ncol = 3, dimnames = list(row 2/14 alike.R: mx.cur2 <- matrix(sample(0:255, 12), ncol = 3, dimnames = list(1: 2/14 alike.R: alike(mx.tpl, mx.cur) [1] TRUE 2/14 alike.R: alike(mx.tpl, mx.cur2) [1] "`dimnames(mx.cur2)` should have attribute \"names\"" 2/14 alike.R: unitizer_sect("Data Frames", { 2/14 alike.R: alike(mtcars, 1:3) [1] "`1:3` should be class \"data.frame\" (is \"integer\")" 2/14 alike.R: alike(1:3, mtcars) [1] "`mtcars` should be type \"integer-like\" (is \"list\")" 2/14 alike.R: alike(data.frame(), data.frame(a = 1:3, b = letters[1:3])) [1] TRUE 2/14 alike.R: (alike)(data.frame(a = integer(), b = factor()), data.frame(a = 1 [1] TRUE 2/14 alike.R: alike(data.frame(a = factor(), b = factor()), data.frame(a = 1:3, [1] "`data.frame(a = 1:3, b = letters[1:3])$a` should be class \"factor\" (is \"integer\")" 2/14 alike.R: alike(list(NULL, structure("a", class = "x")), list(NULL, structu [1] "`list(NULL, structure(\"a\", class = \"y\"))[[2]]` should be class \"x\" (is \"y\")" 2/14 alike.R: alike(list(integer(), data.frame(a = integer(), b = numeric()), [1] TRUE 2/14 alike.R: df.tpl <- structure(list(1:4, factor(LETTERS[1:4], levels = LETTE 2/14 alike.R: df.cur <- `row.names<-`(data.frame(id = 5:8, val = factor(LETTERS 2/14 alike.R: df.cur2 <- `row.names<-`(data.frame(id = 5:8, val = factor(LETTER 2/14 alike.R: alike(df.tpl, df.cur) [1] TRUE 2/14 alike.R: alike(df.cur, df.tpl) [1] "`names(df.tpl)[2]` should be \"val\" (is \"\")" 2/14 alike.R: alike(df.tpl, df.cur2) [1] "`row.names(df.cur2)[1]` should be \"one\" (is \"uno\")" 2/14 alike.R: df.tpl <- structure(list(1:4, letters[1:4]), names = c("id", 2/14 alike.R: df.cur <- structure(list(1:4, letters[1:4]), names = c("id", 2/14 alike.R: alike(df.tpl, df.tpl) [1] TRUE 2/14 alike.R: alike(df.tpl, df.cur) [1] "`names(df.cur)[2]` should be \"NA\" (is \"val\")" 2/14 alike.R: alike(mtcars, iris) [1] "`iris` should have 11 columns (has 5)" 2/14 alike.R: alike(mtcars, mtcars[1:10, ]) [1] "`mtcars[1:10, ]` should have 32 rows (has 10)" 2/14 alike.R: alike(mtcars[-5], mtcars) [1] "`mtcars` should have 10 columns (has 11)" 2/14 alike.R: unitizer_sect("Time Series", { 2/14 alike.R: ts.1 <- ts(runif(24), 1970, frequency = 12) 2/14 alike.R: ts.2 <- ts(runif(24), 1970, frequency = 4) 2/14 alike.R: ts.3 <- abstract(ts.1, "end") 2/14 alike.R: ts.4 <- abstract(ts.2, "frequency") 2/14 alike.R: alike(ts.1, ts.2) [1] "`tsp(ts.2)[2]` should be 1971.92 (is 1975.75)" 2/14 alike.R: alike(ts.3, ts.1) [1] TRUE 2/14 alike.R: alike(ts.1, ts.3) [1] "`tsp(ts.3)[2]` should be 1971.92 (is 0)" 2/14 alike.R: alike(ts.3, ts.2) [1] "`tsp(ts.2)[3]` should be 12 (is 4)" 2/14 alike.R: ts.5 <- ts(matrix(runif(24 * 3), ncol = 3), 1970, frequency = 12) 2/14 alike.R: ts.6 <- ts(matrix(runif(12 * 3), ncol = 3), 1970, frequency = 12) 2/14 alike.R: alike(ts.5, ts.6) [1] "`tsp(ts.6)[2]` should be 1971.92 (is 1970.92)" 2/14 alike.R: alike(ts.5, matrix(runif(24 * 3), ncol = 3)) [1] "`matrix(runif(24 * 3), ncol = 3)` should be class \"mts\" (is \"numeric\")" 2/14 alike.R: unitizer_sect("Factors", { 2/14 alike.R: f1 <- factor(letters[1:5]) 2/14 alike.R: f2 <- factor(letters[1:5], levels = letters[5:1]) 2/14 alike.R: f3 <- f1 2/14 alike.R: levels(f3)[[5]] <- "" 2/14 alike.R: f4 <- factor(c(letters[1:4], "f")) 2/14 alike.R: alike(f1, f2) [1] "`levels(f2)[1]` should be \"a\" (is \"e\")" 2/14 alike.R: alike(f1, f3) [1] "`levels(f3)[5]` should be \"e\" (is \"\")" 2/14 alike.R: alike(f1, f4) [1] "`levels(f4)[5]` should be \"e\" (is \"f\")" 2/14 alike.R: alike(f3, f1) [1] TRUE 2/14 alike.R: alike(f3, f4) [1] TRUE 2/14 alike.R: unitizer_sect("Environments / Pairlists", { 2/14 alike.R: env0 <- new.env() 2/14 alike.R: env1 <- list2env(list(a = character(), b = list(), c = NULL)) 2/14 alike.R: env2 <- list2env(list(a = "hello", b = iris, c = matrix(1:3))) 2/14 alike.R: env3 <- list2env(list(a = "hello", b = iris)) 2/14 alike.R: env4 <- list2env(list(a = "hello", b = iris, c = logical(1L), 2/14 alike.R: env5 <- list2env(list(b = iris, a = "hello", c = matrix(1:3))) 2/14 alike.R: alike(env0, env2) [1] TRUE 2/14 alike.R: alike(env1, env2) [1] TRUE 2/14 alike.R: alike(env1, env3) [1] "`env3` should contain variable `c`" 2/14 alike.R: alike(env3, env1) [1] "`length(env1$a)` should be 1 (is 0)" 2/14 alike.R: alike(env1, env4) [1] TRUE 2/14 alike.R: alike(env1, env5) [1] TRUE 2/14 alike.R: rec.env <- rec.env.cpy <- new.env() 2/14 alike.R: for (i in 1:50) { 2/14 alike.R: rec.env.cpy$a <- rec.env 2/14 alike.R: alike(rec.env, rec.env) [1] TRUE 2/14 alike.R: plst1 <- pairlist(a = character(), b = list(), c = NULL) 2/14 alike.R: plst2 <- pairlist(a = "hello", b = iris, c = matrix(1:3)) 2/14 alike.R: plst3 <- pairlist(a = "hello", b = iris) 2/14 alike.R: plst4 <- pairlist(a = "hello", b = iris, c = logical(1L), d = log 2/14 alike.R: plst5 <- pairlist(a = character(), b = list(), integer()) 2/14 alike.R: plst6 <- pairlist(a = character(), b = list(), boogey = 1:3) 2/14 alike.R: plst7 <- pairlist(a = character(), boogey = 1:3, b = list()) 2/14 alike.R: alike(plst1, plst2) [1] TRUE 2/14 alike.R: alike(plst1, plst3) [1] "`length(plst3)` should be 3 (is 2)" 2/14 alike.R: alike(plst1, plst4) [1] "`length(plst4)` should be 3 (is 4)" 2/14 alike.R: alike(plst1, plst5) [1] "`names(plst5)[[3L]]` should be \"c\" (is \"\")" 2/14 alike.R: alike(plst5, plst6) [1] TRUE 2/14 alike.R: alike(plst5, plst7) [1] "`names(plst7)[[2L]]` should be \"b\" (is \"boogey\")" 2/14 alike.R: env7 <- list2env(list(a = character(), b = plst1)) 2/14 alike.R: env8 <- list2env(list(a = letters[1:3], b = plst2)) 2/14 alike.R: env9 <- list2env(list(a = letters[1:3], b = plst5)) 2/14 alike.R: alike(env7, env8) [1] TRUE 2/14 alike.R: alike(env7, env9) [1] "`names(env9$b)[[3L]]` should be \"c\" (is \"\")" 2/14 alike.R: env.nest.1 <- env.nest.1.cpy <- new.env() 2/14 alike.R: env.nest.2 <- env.nest.2.cpy <- new.env() 2/14 alike.R: for (i in 1:26) { 2/14 alike.R: alike(env.nest.1, env.nest.2, settings = vetr_settings(env.depth. Warning in alike(env.nest.1, env.nest.2, settings = vetr_settings(env.depth.max = 16)) : `alike` environment stack exhausted at recursion depth 16; unable to recurse any further into environments; see `env.depth.max` parameter for `vetr_settings`. [1] TRUE 2/14 alike.R: alike(.GlobalEnv, env.nest.1) [1] "`env.nest.1` should be the global environment" 2/14 alike.R: unitizer_sect("Calls / Formulas", { 2/14 alike.R: alike(quote(1 + 1), quote(x + y)) [1] "`quote(x + y)[[2]]` should be \"double\" (is \"symbol\")" 2/14 alike.R: alike(quote(fun(1 + 1)), quote(fun(x + y, 9))) [1] "`quote(fun(x + y, 9))[[2]][[2]]` should be \"double\" (is \"symbol\")" 2/14 alike.R: alike(quote(fun(x + y, 9)), quote(fun(1 + 1))) [1] "`quote(fun(1 + 1))[[2]][[2]]` should be \"symbol\" (is \"double\")" 2/14 alike.R: "%plusq%" <- function(x, y) call("+", substitute(x), substitute(y 2/14 alike.R: alike(quote(1 + 1), 1 %plusq% b) [1] "`(1 %plusq% b)[[3]]` should be \"double\" (is \"symbol\")" 2/14 alike.R: fun <- function(a, b, c) NULL 2/14 alike.R: alike(quote(fun(b = fun2(x, y), 1, 3)), quote(fun(NULL, fun2(a, [1] TRUE 2/14 alike.R: (alike)(quote(fun(b = fun2(x, y), 1, 3)), quote(fun(NULL, fun2(a, [1] "`quote(fun(NULL, fun2(a, b), 1))` should have argument `b` as first argument (has unnamed argument)" 2/14 alike.R: alike(quote(fun(b = fun2(x, y), 1, 3)), quote(fun(fun2(a, b), [1] "`quote(fun(fun2(a, b), NULL, 1))[[2]]` should be \"double\" (is \"language\")" 2/14 alike.R: alike(quote(fun(a = 1)), quote(fun(b = 1))) [1] "`quote(fun(b = 1))` should have argument `a` as first argument (has `b`)" 2/14 alike.R: alike(quote(fun(1, 2)), quote(fun(1))) [1] "`quote(fun(1))` should have 2 arguments (has 1)" 2/14 alike.R: alike(quote(fun(1)), quote(fun(1, 2))) [1] "`quote(fun(1, 2))` should have 1 arguments (has 2)" 2/14 alike.R: alike(quote(fun(1, 2)), quote(fun2(1, 2))) [1] "`quote(fun2(1, 2))[[1]]` should be a call to `fun` (is a call to `fun2`)" 2/14 alike.R: alike(quote(fun(1, fun2(3))), quote(fun(1, fun(3)))) [1] "`quote(fun(1, fun(3)))[[3]][[1]]` should be a call to `fun2` (is a call to `fun`)" 2/14 alike.R: alike(quote(fun()), quote(fun(a, b, c))) [1] TRUE 2/14 alike.R: alike(quote(fun()), quote(fun2(a, b, c))) [1] "`quote(fun2(a, b, c))[[1]]` should be a call to `fun` (is a call to `fun2`)" 2/14 alike.R: alike(quote(fun(a, fun2())), quote(fun(b, fun2(a, b, c)))) [1] TRUE 2/14 alike.R: c0 <- quote(fun(a, b, a, 25)) 2/14 alike.R: c0.1 <- c0.2 <- c0 2/14 alike.R: attr(c0.1, "blah") <- "hello" 2/14 alike.R: attr(c0.2, "blah") <- 1:3 2/14 alike.R: alike(c0, c0.1) [1] TRUE 2/14 alike.R: alike(c0.1, c0) [1] "`c0` should have attribute \"blah\"" 2/14 alike.R: alike(c0.1, c0.2) [1] "`attr(c0.2, \"blah\")` should be character (is integer)" 2/14 alike.R: alike(x ~ y, z ~ w) [1] TRUE 2/14 alike.R: alike(x ~ y, z ~ w + 1) [1] "`(z ~ w + 1)[[3]]` should be \"symbol\" (is \"language\")" 2/14 alike.R: alike(x ~ y + 2, z ~ w + 1) [1] "`(z ~ w + 1)[[3]][[3]]` should have identical constant values" 2/14 alike.R: alike(x ~ y + z:y, w ~ v + u:v) [1] TRUE 2/14 alike.R: alike(z ~ w + 1, x ~ y) [1] "`(x ~ y)[[3]]` should be a call to `+` (is \"symbol\")" 2/14 alike.R: alike(y ~ x^2 + x * z + z + w:z, q ~ l^2 + l * j + j + w:j) [1] TRUE 2/14 alike.R: alike(y ~ x^2 + x * z + z + w:z, q ~ l^3 + l * j + j + w:j) [1] "`(q ~ l^3 + l * j + j + w:j)[[3]][[2]][[2]][[2]][[3]]` should have identical constant values" 2/14 alike.R: exp.1 <- parse(text = "x + y; fun2(fun(1, 2, 3), z)", keep.source 2/14 alike.R: exp.2 <- parse(text = "z + 2; fun(fun2(1, 2, 3), q)", keep.source 2/14 alike.R: exp.3 <- parse(text = "z + fun(3); fun(fun2(a, b, c), 3)", keep.s 2/14 alike.R: alike(exp.1, exp.2) [1] "`exp.2[[1]][[3]]` should be \"symbol\" (is \"double\")" 2/14 alike.R: alike(exp.2, exp.3) [1] "`exp.3[[1]][[3]]` should be \"double\" (is \"language\")" 2/14 alike.R: alike(exp.3, exp.2) [1] "`exp.2[[1]][[3]]` should be a call to `fun` (is \"double\")" 2/14 alike.R: exp.4 <- expression(1 + 1, 2 + x) 2/14 alike.R: exp.5 <- expression(1 + 1, 5 + y) 2/14 alike.R: exp.6 <- expression(1 + 1, 2 + 2) 2/14 alike.R: alike(exp.4, exp.5) [1] TRUE 2/14 alike.R: alike(exp.4, exp.6) [1] "`exp.6[[2]][[3]]` should be \"symbol\" (is \"double\")" 2/14 alike.R: alike(quote(x), quote(y)) [1] TRUE 2/14 alike.R: alike(NULL, quote(x)) [1] "`quote(x)` should be `NULL` (is \"symbol\")" 2/14 alike.R: alike(quote((NULL)), quote(y)) [1] TRUE 2/14 alike.R: alike(quote(NULL), quote(x)) [1] "`quote(x)` should be `NULL` (is \"symbol\")" 2/14 alike.R: alike(quote(x), c0) [1] "`c0` should be \"symbol\" (is \"language\")" 2/14 alike.R: alike(c0, quote(x)) [1] "`quote(x)` should be a call to `fun` (is \"symbol\")" 2/14 alike.R: alike(quote((x)), quote(y)) [1] TRUE 2/14 alike.R: unitizer_sect("Functions", { 2/14 alike.R: alike(print, print.data.frame) [1] TRUE 2/14 alike.R: alike(print.data.frame, print) [1] "`print` should have argument `digits` after argument `...`" 2/14 alike.R: alike(`&&`, function() NULL) Error in alike(`&&`, function() NULL) : argument of type NILSXP is not a closure Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> alike 2/14 alike.R: fun <- fun2 <- function() NULL 2/14 alike.R: attributes(fun2) <- NULL 2/14 alike.R: alike(fun, fun2) [1] TRUE 2/14 alike.R: alike(fun, fun2, settings = vetr_settings(attr.mode = 2L)) [1] "`fun2` should have attribute \"srcref\"" 2/14 alike.R: alike(fun2, fun, settings = vetr_settings(attr.mode = 1L)) [1] TRUE 2/14 alike.R: alike(fun2, fun, settings = vetr_settings(attr.mode = 2L)) [1] "`fun` should not have attribute \"srcref\"" 2/14 alike.R: unitizer_sect("settings", { 2/14 alike.R: alike(1L, 1, settings = vetr_settings(type.mode = 1L)) [1] "`1` should be type \"integer\" (is \"double\")" 2/14 alike.R: alike(1, 1L, settings = vetr_settings(type.mode = 1L)) [1] TRUE 2/14 alike.R: alike(1, 1L, settings = vetr_settings(type.mode = 2L)) [1] "`1L` should be type \"double\" (is \"integer\")" 2/14 alike.R: alike(1:101, 1:101 + 0) [1] "`1:101 + 0` should be type \"integer\" (is \"double\")" 2/14 alike.R: alike(1:101, 1:101 + 0, settings = vetr_settings(fuzzy.int.max.le [1] TRUE 2/14 alike.R: alike(1:101, 1:101 + 0, settings = vetr_settings(fuzzy.int.max.le [1] TRUE 2/14 alike.R: alike(list(a = 1:10), data.frame(a = 1:10)) [1] TRUE 2/14 alike.R: alike(list(a = 1:10), data.frame(a = 1:10), settings = vetr_setti [1] TRUE 2/14 alike.R: alike(list(a = 1:10), data.frame(a = 1:10), settings = vetr_setti [1] "`data.frame(a = 1:10)` should not have attribute \"class\"" 2/14 alike.R: fun <- function(a, b, c) NULL 2/14 alike.R: call.a <- quote(fun(b = fun2(x, y), 1, 3)) 2/14 alike.R: call.b <- quote(fun(NULL, fun2(a, b), 1)) 2/14 alike.R: alike(call.a, call.b, settings = vetr_settings(env = emptyenv())) [1] "`call.b` should have argument `b` as first argument (has unnamed argument)" 2/14 alike.R: alike(call.a, call.b, env = emptyenv()) [1] "`call.b` should have argument `b` as first argument (has unnamed argument)" 2/14 alike.R: alike(call.a, call.b, env = emptyenv(), settings = vetr_settings( [1] TRUE 2/14 alike.R: alike(call.a, call.b) [1] TRUE 2/14 alike.R: alike(`&&`, function() NULL, settings = vetr_settings(type.mode = Error in alike(`&&`, function() NULL, settings = vetr_settings(type.mode = 1)) : argument of type NILSXP is not a closure Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> alike 2/14 alike.R: alike(1, 2, settings = letters) Error in alike(1, 2, settings = letters) : `vet/vetr` usage error: argument `settings` must be a list or NULL (is character). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> alike 2/14 alike.R: alike(1, 2, settings = list()) Error in alike(1, 2, settings = list()) : `vet/vetr` usage error: `settings` must be a list of length 16. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> alike 2/14 alike.R: alike(1, 2, settings = setNames(vector("list", 16), letters[1:16] Error in alike(1, 2, settings = setNames(vector("list", 16), letters[1:16])) : `vet/vetr` usage error: argument `settings` names are not in format produced by `vetr_settings`. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> alike 2/14 alike.R: alike(1, 2, settings = vector("list", 16)) Error in alike(1, 2, settings = vector("list", 16)) : `vet/vetr` usage error: argument `settings` must be a named list as produced by `vetr_settings`. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> alike 2/14 alike.R: unitizer_sect("Examples", { 2/14 alike.R: alike(1L, 1) [1] TRUE 2/14 alike.R: alike(1L, 1.1) [1] "`1.1` should be type \"integer-like\" (is \"double\")" 2/14 alike.R: alike(1.1, 1L) [1] TRUE 2/14 alike.R: alike(1:100, 1:100 + 0) [1] TRUE 2/14 alike.R: alike(1:101, 1:101 + 0) [1] "`1:101 + 0` should be type \"integer\" (is \"double\")" 2/14 alike.R: alike(integer(1L), 1) [1] TRUE 2/14 alike.R: alike(logical(1L), TRUE) [1] TRUE 2/14 alike.R: alike(integer(1L), 1:3) [1] "`length(1:3)` should be 1 (is 3)" 2/14 alike.R: alike(logical(1L), c(TRUE, TRUE)) [1] "`length(c(TRUE, TRUE))` should be 1 (is 2)" 2/14 alike.R: alike(integer(), 1:10) [1] TRUE 2/14 alike.R: alike(1:10, integer()) [1] "`length(integer())` should be 10 (is 0)" 2/14 alike.R: alike(list(integer(), list(character(), logical(1L))), list(1:10, [1] TRUE 2/14 alike.R: alike(list(integer(), list(character(), logical(1L))), list(1:10, [1] "`length(list(1:10, list(letters, c(TRUE, FALSE)))[[2]][[2]])` should be 1 (is 2)" 2/14 alike.R: alike(list(NULL, NULL), list(iris, mtcars)) [1] TRUE 2/14 alike.R: alike(NULL, mtcars) [1] "`mtcars` should be `NULL` (is \"list\")" 2/14 alike.R: iris.fake <- transform(iris, Species = as.character(Species)) 2/14 alike.R: alike(iris, iris.fake) [1] "`iris.fake$Species` should be class \"factor\" (is \"character\")" 2/14 alike.R: iris.fake2 <- transform(iris, Species = factor(Species, levels = 2/14 alike.R: alike(iris, iris.fake2) [1] "`levels(iris.fake2$Species)[3]` should be \"virginica\" (is \"americana\")" 2/14 alike.R: iris.tpl <- abstract(iris) 2/14 alike.R: str(iris.tpl) 'data.frame': 0 obs. of 5 variables: $ Sepal.Length: num $ Sepal.Width : num $ Petal.Length: num $ Petal.Width : num $ Species : Factor w/ 3 levels "setosa","versicolor",..: 2/14 alike.R: alike(iris.tpl, iris) [1] TRUE 2/14 alike.R: alike(iris.tpl, iris[sample(1:nrow(iris), 10), ]) [1] TRUE 2/14 alike.R: alike(iris.tpl, iris[c(2, 1, 3, 4, 5)]) [1] "`names(iris[c(2, 1, 3, 4, 5)])[1]` should be \"Sepal.Length\" (is \"Sepal.Width\")" 2/14 alike.R: alike(matrix(integer(), 3, 3), matrix(1:9, nrow = 3)) [1] TRUE 2/14 alike.R: alike(matrix(integer(), 3, 3), matrix(runif(9), nrow = 3)) [1] "`matrix(runif(9), nrow = 3)` should be type \"integer-like\" (is \"double\")" 2/14 alike.R: alike(matrix(integer(), 3), matrix(1:12, nrow = 3)) [1] TRUE 2/14 alike.R: alike(matrix(integer(), 3), matrix(1:12, nrow = 4)) [1] "`matrix(1:12, nrow = 4)` should have 3 rows (has 4)" 2/14 alike.R: alike(matrix(logical()), array(rep(TRUE, 8), rep(2, 3))) [1] "`array(rep(TRUE, 8), rep(2, 3))` should be \"matrix\" (is \"array\")" 2/14 alike.R: obj.tpl <- structure(TRUE, class = letters[1:3]) 2/14 alike.R: obj.cur.1 <- structure(TRUE, class = c("x", letters[1:3])) 2/14 alike.R: obj.cur.2 <- structure(TRUE, class = c(letters[1:3], "x")) 2/14 alike.R: alike(obj.tpl, obj.cur.1) [1] TRUE 2/14 alike.R: alike(obj.tpl, obj.cur.2) [1] "`class(obj.cur.2)[2]` should be \"a\" (is \"b\")" 2/14 alike.R: alike(quote(x + y), quote(a + b)) [1] TRUE 2/14 alike.R: alike(quote(x + y), quote(a - b)) [1] "`quote(a - b)[[1]]` should be a call to `+` (is a call to `-`)" 2/14 alike.R: alike(quote(x + y), quote(a + a)) [1] "`quote(a + a)[[3]]` should not be `a`" 2/14 alike.R: unitizer_sect("Raw", { 2/14 alike.R: alike(as.raw(integer(3)), as.raw(integer(3))) Warning in alike(as.raw(integer(3)), as.raw(integer(3))) : `alike` behavior for objects of type "raw" is not well defined and may change in the future [1] TRUE 2/14 alike.R: unitizer_sect("Errors", { 2/14 alike.R: alike(NULL, NULL, settings = vetr_settings(type.mode = 3)) Error in alike(NULL, NULL, settings = vetr_settings(type.mode = 3)) : Setting `type.mode` must be scalar integer between 0 and 2 (is 3). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> alike 2/14 alike.R: alike(NULL, NULL, settings = vetr_settings(attr.mode = letters)) Error in alike(NULL, NULL, settings = vetr_settings(attr.mode = letters)) : Setting `attr.mode` must be integer-like (is character). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> alike 2/14 alike.R: alike(NULL, NULL, settings = vetr_settings(lang.mode = letters)) Error in alike(NULL, NULL, settings = vetr_settings(lang.mode = letters)) : Setting `lang.mode` must be integer-like (is character). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> alike 2/14 alike.R: alike(NULL, NULL, settings = vetr_settings(fuzzy.int.max.len = NA Error in alike(NULL, NULL, settings = vetr_settings(fuzzy.int.max.len = NA_integer_)) : Setting `fuzzy.int.max.len` may not be NA. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> alike 2/14 alike.R: alike(NULL, NULL, settings = vetr_settings(suppress.warnings = NA Error in alike(NULL, NULL, settings = vetr_settings(suppress.warnings = NA)) : `vet/vetr` usage error: setting `suppress.warnings` must be TRUE or FALSE Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> alike 2/14 alike.R: alike(NULL, NULL, settings = vetr_settings(env = letters)) Error in alike(NULL, NULL, settings = vetr_settings(env = letters)) : `ver/vetr` usage error: setting `env` must be an environment or NULL Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> alike 2/14 alike.R: alike(NULL, NULL, settings = vetr_settings(width = letters)) Error in alike(NULL, NULL, settings = vetr_settings(width = letters)) : Setting `width` must be integer-like (is character). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> alike 2/14 alike.R: alike(NULL, NULL, settings = vetr_settings(env.depth.max = -1L)) [1] TRUE 2/14 alike.R: unitizer_sect("Attributes", { 2/14 alike.R: obj.tpl <- structure(integer(), a = integer()) 2/14 alike.R: obj.obj <- structure(1:10, a = 1:3) 2/14 alike.R: alike(obj.tpl, obj.obj) [1] TRUE 2/14 alike.R: obj.tpl.a <- structure(integer(), class = "foo") 2/14 alike.R: obj.obj.a <- structure(matrix(1:3)) 2/14 alike.R: alike(obj.tpl.a, obj.obj.a) [1] "`obj.obj.a` should be class \"foo\" (is \"integer\")" 2/14 alike.R: obj.tpl.b <- structure(matrix(integer()), class = "foo") 2/14 alike.R: obj.obj.b <- structure(matrix(1:3)) 2/14 alike.R: alike(obj.tpl.b, obj.obj.b) [1] "`obj.obj.b` should be class \"foo\" (is \"integer\")" 2/14 alike.R: obj.tpl.c <- structure(matrix(integer()), class = "foo") 2/14 alike.R: obj.obj.c <- structure(matrix(1:3), class = "foo") 2/14 alike.R: alike(obj.tpl.c, obj.obj.c) [1] TRUE 2/14 alike.R: obj.tpl.d <- structure(integer(), class = "foo") 2/14 alike.R: obj.obj.d <- structure(matrix(1:3), class = "foo") 2/14 alike.R: alike(obj.tpl.d, obj.obj.d) [1] TRUE 2/14 alike.R: obj.tpl.e <- structure(integer()) 2/14 alike.R: obj.obj.e <- structure(matrix(1:3), class = "foo") 2/14 alike.R: alike(obj.tpl.e, obj.obj.e) [1] TRUE 2/14 alike.R: obj.tpl.f <- structure(integer(), a = integer()) 2/14 alike.R: obj.obj.f <- structure(matrix(1:3), z = integer(), class = "foo") 2/14 alike.R: alike(obj.tpl.f, obj.obj.f) [1] "`obj.obj.f` should have attribute \"a\"" 2/14 alike.R: obj.tpl.g <- structure(integer(), a = integer()) 2/14 alike.R: obj.obj.g <- structure(matrix(1:3), z = integer(), class = "foo") 2/14 alike.R: alike(obj.tpl.g, obj.obj.g) [1] "`obj.obj.g` should have attribute \"a\"" 2/14 alike.R: obj.tpl.h <- structure(matrix(integer())) 2/14 alike.R: obj.obj.h <- structure(1:3, a = integer()) 2/14 alike.R: alike(obj.tpl.h, obj.obj.h) [1] "`obj.obj.h` should be \"matrix\" (is \"integer\")" 2/14 alike.R: alike(obj.tpl.h, obj.obj.h, settings = vetr_settings(attr.mode = [1] "`obj.obj.h` should have attribute \"dim\"" 2/14 alike.R: obj.tpl.i <- structure(character(), a = integer(), class = "boo") 2/14 alike.R: obj.obj.i <- structure(matrix(1:3)) 2/14 alike.R: alike(obj.tpl.i, obj.obj.i) [1] "`obj.obj.i` should be class \"boo\" (is \"integer\")" 2/14 alike.R: obj.tpl.k <- integer() 2/14 alike.R: obj.obj.k <- matrix(1:3) 2/14 alike.R: alike(obj.tpl.k, obj.obj.k) [1] TRUE 2/14 alike.R: alike(obj.tpl.k, obj.obj.k, settings = vetr_settings(attr.mode = [1] "`obj.obj.k` should not have attribute \"dim\"" 3/14 all-bw.R: 3/14 all-bw.R: library(vetr) 3/14 all-bw.R: set.seed(42) 3/14 all-bw.R: x <- runif(100) 3/14 all-bw.R: x[1] <- 1 3/14 all-bw.R: x[2] <- 0 3/14 all-bw.R: unitizer_sect("all_bw - real", { 3/14 all-bw.R: all_bw(x, 0, 1) [1] TRUE 3/14 all-bw.R: all_bw(x, 0, 1, bounds = "[)") [1] "`1` at index 1 not in `[0,1)`" 3/14 all-bw.R: all_bw(x, 0, 1, bounds = "(]") [1] "`0` at index 2 not in `(0,1]`" 3/14 all-bw.R: all_bw(x, 0, 1, bounds = "()") [1] "`1` at index 1 not in `(0,1)`" 3/14 all-bw.R: all_bw(x, 0, 1 + 1e-06, bounds = "[)") [1] TRUE 3/14 all-bw.R: all_bw(x, 0 - 1e-06, 1, bounds = "(]") [1] TRUE 3/14 all-bw.R: all_bw(x, 0 - 1e-06, 1 + 1e-06, bounds = "()") [1] TRUE 3/14 all-bw.R: y <- z <- x 3/14 all-bw.R: y[50] <- NA 3/14 all-bw.R: z[50] <- NaN 3/14 all-bw.R: all_bw(y, 0, 1) [1] "`NA` at index 50 not in `[0,1]`" 3/14 all-bw.R: all_bw(y, 0, 1, na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(y, 0.5, 0.75, na.rm = TRUE) [1] "`1` at index 1 not in `[0.500000,0.750000]`" 3/14 all-bw.R: all_bw(y, -1, 2, na.rm = TRUE, bounds = "()") [1] TRUE 3/14 all-bw.R: all_bw(y, 0, 1, na.rm = TRUE, bounds = "()") [1] "`1` at index 1 not in `(0,1)`" 3/14 all-bw.R: all_bw(y, 0 - 1e-06, 1, na.rm = TRUE, bounds = "(]") [1] TRUE 3/14 all-bw.R: all_bw(y, 0, 1, na.rm = TRUE, bounds = "(]") [1] "`0` at index 2 not in `(0,1]`" 3/14 all-bw.R: all_bw(y, 0, 1 + 1e-06, na.rm = TRUE, bounds = "[)") [1] TRUE 3/14 all-bw.R: all_bw(y, 0, 1, na.rm = TRUE, bounds = "[)") [1] "`1` at index 1 not in `[0,1)`" 3/14 all-bw.R: all_bw(z, 0, 1) [1] "`NaN` at index 50 not in `[0,1]`" 3/14 all-bw.R: all_bw(z, 0, 1, na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(z) [1] "`NaN` at index 50 not in `[-Inf,Inf]`" 3/14 all-bw.R: all_bw(z, na.rm = TRUE) [1] TRUE 3/14 all-bw.R: w <- runif(1000, -1000, 1000) 3/14 all-bw.R: all_bw(w, -1000, 1000) [1] TRUE 3/14 all-bw.R: all_bw(w, -1500, 500) [1] "`813.406915` at index 1 not in `[-1500,500]`" 3/14 all-bw.R: all_bw(w, -500, 1500) [1] "`-681.421638` at index 12 not in `[-500,1500]`" 3/14 all-bw.R: unitizer_sect("corner cases - real", { 3/14 all-bw.R: all_bw(x, 0, 0) [1] "`1` at index 1 not in `[0,0]`" 3/14 all-bw.R: all_bw(0, 0, 0) [1] TRUE 3/14 all-bw.R: all_bw(0, 0, 0, bounds = "()") [1] "`0` at index 1 not in `(0,0)`" 3/14 all-bw.R: all_bw(NA_real_) [1] "`NA` at index 1 not in `[-Inf,Inf]`" 3/14 all-bw.R: all_bw(NA_real_, bounds = "()") [1] "`NA` at index 1 not in `(-Inf,Inf)`" 3/14 all-bw.R: all_bw(numeric(), 0, 1) [1] TRUE 3/14 all-bw.R: all_bw(numeric(), 0, 0, bounds = "()") [1] TRUE 3/14 all-bw.R: unitizer_sect("Infinity - real", { 3/14 all-bw.R: n1e100 <- 1e+100 3/14 all-bw.R: n_1e100 <- -1e+100 3/14 all-bw.R: n2e100 <- 2e+100 3/14 all-bw.R: n_2e100 <- -2e+100 3/14 all-bw.R: n11e100 <- 1.1e+100 3/14 all-bw.R: n_11e100 <- -1.1e+100 3/14 all-bw.R: n1e200 <- 1e+200 3/14 all-bw.R: n_1e200 <- -1e+200 3/14 all-bw.R: z <- runif(100, n_1e100, n1e100) 3/14 all-bw.R: z[1] <- n_1e100 3/14 all-bw.R: z[2] <- n1e100 3/14 all-bw.R: r <- w <- v <- u <- x <- z 3/14 all-bw.R: all_bw(z, -Inf, n1e100) [1] TRUE 3/14 all-bw.R: all_bw(z, -Inf, n1e100, bounds = "[)") [1] "`1.000000e+100` at index 2 not in `[-Inf,1.000000e+100)`" 3/14 all-bw.R: all_bw(z, -Inf, n1e100, bounds = "()") [1] "`1.000000e+100` at index 2 not in `(-Inf,1.000000e+100)`" 3/14 all-bw.R: all_bw(z, -Inf, n1e100, bounds = "(]") [1] TRUE 3/14 all-bw.R: all_bw(c(z, n2e100), -Inf, n1e100, bounds = "(]") [1] "`2.000000e+100` at index 101 not in `(-Inf,1.000000e+100]`" 3/14 all-bw.R: all_bw(z, -Inf, n11e100, bounds = "[)") [1] TRUE 3/14 all-bw.R: all_bw(z, -Inf, n11e100, bounds = "()") [1] TRUE 3/14 all-bw.R: all_bw(z, n_1e100, Inf) [1] TRUE 3/14 all-bw.R: all_bw(z, n_1e100, Inf, bounds = "(]") [1] "`-1.000000e+100` at index 1 not in `(-1.000000e+100,Inf]`" 3/14 all-bw.R: all_bw(z, n_1e100, Inf, bounds = "()") [1] "`-1.000000e+100` at index 1 not in `(-1.000000e+100,Inf)`" 3/14 all-bw.R: all_bw(z, n_1e100, Inf, bounds = "[)") [1] TRUE 3/14 all-bw.R: all_bw(c(z, n_2e100), n_1e100, Inf, bounds = "[)") [1] "`-2.000000e+100` at index 101 not in `[-1.000000e+100,Inf)`" 3/14 all-bw.R: all_bw(z, n_11e100, Inf, bounds = "(]") [1] TRUE 3/14 all-bw.R: all_bw(z, n_11e100, Inf, bounds = "()") [1] TRUE 3/14 all-bw.R: r[50] <- NA_real_ 3/14 all-bw.R: all_bw(r, -Inf, n1e100) [1] "`NA` at index 50 not in `[-Inf,1.000000e+100]`" 3/14 all-bw.R: all_bw(r, -Inf, n1e100, bounds = "[)") [1] "`1.000000e+100` at index 2 not in `[-Inf,1.000000e+100)`" 3/14 all-bw.R: all_bw(r, -Inf, n1e100, bounds = "()") [1] "`1.000000e+100` at index 2 not in `(-Inf,1.000000e+100)`" 3/14 all-bw.R: all_bw(r, -Inf, n1e100, bounds = "(]") [1] "`NA` at index 50 not in `(-Inf,1.000000e+100]`" 3/14 all-bw.R: all_bw(r, -Inf, n11e100, bounds = "[)") [1] "`NA` at index 50 not in `[-Inf,1.100000e+100)`" 3/14 all-bw.R: all_bw(r, -Inf, n11e100, bounds = "()") [1] "`NA` at index 50 not in `(-Inf,1.100000e+100)`" 3/14 all-bw.R: all_bw(r, n_1e100, Inf) [1] "`NA` at index 50 not in `[-1.000000e+100,Inf]`" 3/14 all-bw.R: all_bw(r, n_1e100, Inf, bounds = "(]") [1] "`-1.000000e+100` at index 1 not in `(-1.000000e+100,Inf]`" 3/14 all-bw.R: all_bw(r, n_1e100, Inf, bounds = "()") [1] "`-1.000000e+100` at index 1 not in `(-1.000000e+100,Inf)`" 3/14 all-bw.R: all_bw(r, n_1e100, Inf, bounds = "[)") [1] "`NA` at index 50 not in `[-1.000000e+100,Inf)`" 3/14 all-bw.R: all_bw(r, n_11e100, Inf, bounds = "(]") [1] "`NA` at index 50 not in `(-1.100000e+100,Inf]`" 3/14 all-bw.R: all_bw(r, n_11e100, Inf, bounds = "()") [1] "`NA` at index 50 not in `(-1.100000e+100,Inf)`" 3/14 all-bw.R: all_bw(r, -Inf, n1e100, na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(r, -Inf, n1e100, bounds = "[)", na.rm = TRUE) [1] "`1.000000e+100` at index 2 not in `[-Inf,1.000000e+100)`" 3/14 all-bw.R: all_bw(r, -Inf, n1e100, bounds = "()", na.rm = TRUE) [1] "`1.000000e+100` at index 2 not in `(-Inf,1.000000e+100)`" 3/14 all-bw.R: all_bw(r, -Inf, n1e100, bounds = "(]", na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(r, -Inf, n11e100, bounds = "[)", na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(r, -Inf, n11e100, bounds = "()", na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(r, n_1e100, Inf, na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(r, n_1e100, Inf, bounds = "(]", na.rm = TRUE) [1] "`-1.000000e+100` at index 1 not in `(-1.000000e+100,Inf]`" 3/14 all-bw.R: all_bw(r, n_1e100, Inf, bounds = "()", na.rm = TRUE) [1] "`-1.000000e+100` at index 1 not in `(-1.000000e+100,Inf)`" 3/14 all-bw.R: all_bw(r, n_1e100, Inf, bounds = "[)", na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(r, n_11e100, Inf, bounds = "(]", na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(r, n_11e100, Inf, bounds = "()", na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(c(r, n2e100), -Inf, n1e100, na.rm = TRUE) [1] "`2.000000e+100` at index 101 not in `[-Inf,1.000000e+100]`" 3/14 all-bw.R: all_bw(c(r, n_2e100), n_1e100, Inf, na.rm = TRUE) [1] "`-2.000000e+100` at index 101 not in `[-1.000000e+100,Inf]`" 3/14 all-bw.R: all_bw(z, -Inf, Inf) [1] TRUE 3/14 all-bw.R: u[50] <- -Inf 3/14 all-bw.R: all_bw(u, n_1e200, n1e200) [1] "`-Inf` at index 50 not in `[-1.000000e+200,1.000000e+200]`" 3/14 all-bw.R: v[50] <- Inf 3/14 all-bw.R: all_bw(v, n_1e200, n1e200) [1] "`Inf` at index 50 not in `[-1.000000e+200,1.000000e+200]`" 3/14 all-bw.R: w[50] <- -Inf 3/14 all-bw.R: w[51] <- Inf 3/14 all-bw.R: all_bw(w, -Inf, Inf) [1] TRUE 3/14 all-bw.R: all_bw(w, -Inf, Inf, bounds = "[)") [1] "`Inf` at index 51 not in `[-Inf,Inf)`" 3/14 all-bw.R: all_bw(w, -Inf, Inf, bounds = "(]") [1] "`-Inf` at index 50 not in `(-Inf,Inf]`" 3/14 all-bw.R: x.int <- sample(-50:50) 3/14 all-bw.R: unitizer_sect("all_bw - int", { 3/14 all-bw.R: all_bw(x.int, -50, 50) [1] TRUE 3/14 all-bw.R: all_bw(x.int, -50L, 50L) [1] TRUE 3/14 all-bw.R: all_bw(x.int, -50, 50, bounds = "[)") [1] "`50` at index 96 not in `[-50,50)`" 3/14 all-bw.R: all_bw(x.int, -50, 50, bounds = "(]") [1] "`-50` at index 37 not in `(-50,50]`" 3/14 all-bw.R: all_bw(x.int, -50, 50, bounds = "()") [1] "`-50` at index 37 not in `(-50,50)`" 3/14 all-bw.R: all_bw(x.int, -50, 50 + 1e-06, bounds = "[)") [1] TRUE 3/14 all-bw.R: all_bw(x.int, -50 - 1e-06, 50, bounds = "(]") [1] TRUE 3/14 all-bw.R: all_bw(x.int, -50 - 1e-06, 50 + 1e-06, bounds = "()") [1] TRUE 3/14 all-bw.R: y.int <- z.int <- x.int 3/14 all-bw.R: y.int[50] <- NA 3/14 all-bw.R: all_bw(y.int, -50, 50) [1] "`NA` at index 50 not in `[-50,50]`" 3/14 all-bw.R: all_bw(y.int, -50, 50, na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(y.int, -49.5, 49.5, na.rm = TRUE) [1] "`-50` at index 37 not in `[-49.500000,49.500000]`" 3/14 all-bw.R: all_bw(y.int, -51, 51, na.rm = TRUE, bounds = "()") [1] TRUE 3/14 all-bw.R: all_bw(y.int, -50.5, 50.5, na.rm = TRUE, bounds = "()") [1] TRUE 3/14 all-bw.R: all_bw(y.int, -50, 50, na.rm = TRUE, bounds = "()") [1] "`-50` at index 37 not in `(-50,50)`" 3/14 all-bw.R: all_bw(y.int, -50 - 1e-06, 50, na.rm = TRUE, bounds = "(]") [1] TRUE 3/14 all-bw.R: all_bw(y.int, -50, 50, na.rm = TRUE, bounds = "(]") [1] "`-50` at index 37 not in `(-50,50]`" 3/14 all-bw.R: all_bw(y.int, -50, 50 + 1e-06, na.rm = TRUE, bounds = "[)") [1] TRUE 3/14 all-bw.R: all_bw(y.int, -50, 50, na.rm = TRUE, bounds = "[)") [1] "`50` at index 96 not in `[-50,50)`" 3/14 all-bw.R: unitizer_sect("corner cases - int", { 3/14 all-bw.R: all_bw(x.int, 0, 0) [1] "`-12` at index 1 not in `[0,0]`" 3/14 all-bw.R: all_bw(0L, 0, 0) [1] TRUE 3/14 all-bw.R: all_bw(0L, 0, 0, bounds = "()") [1] "`0` at index 1 not in `(0,0)`" 3/14 all-bw.R: all_bw(NA_integer_) [1] "`NA` at index 1 not in `[-Inf,Inf]`" 3/14 all-bw.R: all_bw(NA) [1] "`NA` at index 1 not in `[-Inf,Inf]`" 3/14 all-bw.R: unitizer_sect("Infinity - int", { 3/14 all-bw.R: int.max <- (Reduce(`*`, rep(2L, 30L)) - 1L) * 2L + 1L 3/14 all-bw.R: int.min <- -int.max 3/14 all-bw.R: z.int <- x.int 3/14 all-bw.R: z.int[1] <- int.max 3/14 all-bw.R: z.int[2] <- int.min 3/14 all-bw.R: r.int <- w.int <- v.int <- u.int <- x.int <- z.int 3/14 all-bw.R: all_bw(z.int, -Inf, int.max) [1] TRUE 3/14 all-bw.R: all_bw(z.int, -Inf, int.max, bounds = "[)") [1] "`2147483647` at index 1 not in `[-Inf,2147483647)`" 3/14 all-bw.R: all_bw(z.int, -Inf, int.max, bounds = "()") [1] "`2147483647` at index 1 not in `(-Inf,2147483647)`" 3/14 all-bw.R: all_bw(z.int, -Inf, int.max, bounds = "(]") [1] TRUE 3/14 all-bw.R: all_bw(z.int, -Inf, int.max - 1L, bounds = "(]") [1] "`2147483647` at index 1 not in `(-Inf,2147483646]`" 3/14 all-bw.R: all_bw(z.int, int.min - 1, int.max + 1) [1] TRUE 3/14 all-bw.R: all_bw(z.int, int.min - 1, int.max + 1, bounds = "()") [1] TRUE 3/14 all-bw.R: all_bw(int.max - 1L, -Inf, int.max, bounds = "()") [1] TRUE 3/14 all-bw.R: all_bw(z.int, int.min, Inf) [1] TRUE 3/14 all-bw.R: all_bw(z.int, int.min, Inf, bounds = "(]") [1] "`-2147483647` at index 2 not in `(-2147483647,Inf]`" 3/14 all-bw.R: all_bw(z.int, int.min, Inf, bounds = "()") [1] "`-2147483647` at index 2 not in `(-2147483647,Inf)`" 3/14 all-bw.R: all_bw(z.int, int.min, Inf, bounds = "[)") [1] TRUE 3/14 all-bw.R: all_bw(z.int, int.min + 1L, Inf, bounds = "[)") [1] "`-2147483647` at index 2 not in `[-2147483646,Inf)`" 3/14 all-bw.R: r.int[50] <- NA_integer_ 3/14 all-bw.R: all_bw(r.int, -Inf, int.max) [1] "`NA` at index 50 not in `[-Inf,2147483647]`" 3/14 all-bw.R: all_bw(r.int, -Inf, int.max, bounds = "[)") [1] "`2147483647` at index 1 not in `[-Inf,2147483647)`" 3/14 all-bw.R: all_bw(r.int, -Inf, int.max, bounds = "()") [1] "`2147483647` at index 1 not in `(-Inf,2147483647)`" 3/14 all-bw.R: all_bw(r.int, -Inf, int.max, bounds = "(]") [1] "`NA` at index 50 not in `(-Inf,2147483647]`" 3/14 all-bw.R: all_bw(r.int, -Inf, int.max - 10, bounds = "(]") [1] "`2147483647` at index 1 not in `(-Inf,2147483637]`" 3/14 all-bw.R: all_bw(z.int, -Inf, int.max - 1L, bounds = "(]", na.rm = TRUE) [1] "`2147483647` at index 1 not in `(-Inf,2147483646]`" 3/14 all-bw.R: all_bw(c(int.max - 1L, NA), -Inf, int.max, bounds = "()", na.rm [1] TRUE 3/14 all-bw.R: all_bw(r.int, int.min, Inf) [1] "`NA` at index 50 not in `[-2147483647,Inf]`" 3/14 all-bw.R: all_bw(r.int, int.min, Inf, bounds = "(]") [1] "`-2147483647` at index 2 not in `(-2147483647,Inf]`" 3/14 all-bw.R: all_bw(r.int, int.min, Inf, bounds = "()") [1] "`-2147483647` at index 2 not in `(-2147483647,Inf)`" 3/14 all-bw.R: all_bw(r.int, int.min, Inf, bounds = "[)") [1] "`NA` at index 50 not in `[-2147483647,Inf)`" 3/14 all-bw.R: all_bw(r.int, -Inf, int.max, na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(r.int, -Inf, int.max, bounds = "[)", na.rm = TRUE) [1] "`2147483647` at index 1 not in `[-Inf,2147483647)`" 3/14 all-bw.R: all_bw(r.int, -Inf, int.max, bounds = "()", na.rm = TRUE) [1] "`2147483647` at index 1 not in `(-Inf,2147483647)`" 3/14 all-bw.R: all_bw(r.int, -Inf, int.max, bounds = "(]", na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(r.int, int.min + 10, Inf, bounds = "[)", na.rm = TRUE) [1] "`-2147483647` at index 2 not in `[-2147483637,Inf)`" 3/14 all-bw.R: all_bw(r.int, int.min, Inf, na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(r.int, int.min, Inf, bounds = "(]", na.rm = TRUE) [1] "`-2147483647` at index 2 not in `(-2147483647,Inf]`" 3/14 all-bw.R: all_bw(r.int, int.min, Inf, bounds = "()", na.rm = TRUE) [1] "`-2147483647` at index 2 not in `(-2147483647,Inf)`" 3/14 all-bw.R: all_bw(r.int, int.min, Inf, bounds = "[)", na.rm = TRUE) [1] TRUE 3/14 all-bw.R: unitizer_sect("error", { 3/14 all-bw.R: all_bw(x, 0, -1) Error in all_bw(x, 0, -1) : Argument `hi` (-1) must be greater than or equal to `lo` (0). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, -1, 1, na.rm = 1) Error in all_bw(x, -1, 1, na.rm = 1) : Argument `na_rm` must be logical (is double). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, -1, 1, na.rm = c(TRUE, FALSE)) Error in all_bw(x, -1, 1, na.rm = c(TRUE, FALSE)) : Argument `na_rm` must be length 1 (is 2). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, -1, 1, na.rm = NA) Error in all_bw(x, -1, 1, na.rm = NA) : Argument `na_rm` must be TRUE or FALSE (is NA). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, -1, 1, bounds = TRUE) Error in all_bw(x, -1, 1, bounds = TRUE) : Argument `bounds` must be character (is logical). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, -1, 1, bounds = letters) Error in all_bw(x, -1, 1, bounds = letters) : Argument `bounds` must be length 1 (is 26). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, -1, 1, bounds = "[[") Error in all_bw(x, -1, 1, bounds = "[[") : Argument `bounds` must be character(1L) in "[]", "[)", "(]", "()" Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, -1, 1, bounds = "))") Error in all_bw(x, -1, 1, bounds = "))") : Argument `bounds` must be character(1L) in "[]", "[)", "(]", "()" Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, -1, 1, bounds = "[") Error in all_bw(x, -1, 1, bounds = "[") : Argument `bounds` must be character(1L) in "[]", "[)", "(]", "()" Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, -1, 1, bounds = "[.]") Error in all_bw(x, -1, 1, bounds = "[.]") : Argument `bounds` must be character(1L) in "[]", "[)", "(]", "()" Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, -1, 1, bounds = NA_character_) Error in all_bw(x, -1, 1, bounds = NA_character_) : Argument `bounds` may not be NA. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, 1:3, 4) Error in all_bw(x, 1:3, 4) : Argument `lo` must be length 1 (is 3). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, 1, 4:5) Error in all_bw(x, 1, 4:5) : Argument `hi` must be length 1 (is 2). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(list(), 1, 2) Error in all_bw(list(), 1, 2) : Argument `x` must be numeric-like or character (is list). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, list(), 2) Error in all_bw(x, list(), 2) : Argument `lo` must be length 1 (is 0). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, 1, list()) Error in all_bw(x, 1, list()) : Argument `hi` must be length 1 (is 0). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, list(1), 2) Error in all_bw(x, list(1), 2) : Argument `lo` must be logical, integer, numeric, or character (is list). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, 1, list(1)) Error in all_bw(x, 1, list(1)) : Argument `hi` must be logical, integer, numeric, or character (is list). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, "a", 1) Error in all_bw(x, "a", 1) : Argument `x` is numeric-like, but `lo` is character. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(x, 1, "a") Error in all_bw(x, 1, "a") : Argument `x` is numeric-like, but `hi` is character. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: unitizer_sect("all_bw - strings", { 3/14 all-bw.R: two.let <- two.let.na <- two.let.inf <- c(letters, do.call(paste 3/14 all-bw.R: all_bw(letters, "a", "z") [1] TRUE 3/14 all-bw.R: all_bw(letters, "z", "a") Error in all_bw(letters, "z", "a") : Argument `hi` (z) must be greater than or equal to `lo` (a). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> all_bw 3/14 all-bw.R: all_bw(letters, "a", "z", bounds = "[)") [1] "`\"z\"` at index 26 not in `[\"a\",\"z\")`" 3/14 all-bw.R: all_bw(letters, "a", "z", bounds = "(]") [1] "`\"a\"` at index 1 not in `(\"a\",\"z\"]`" 3/14 all-bw.R: all_bw(two.let, "aa", "zz") [1] "`\"a\"` at index 1 not in `[\"aa\",\"zz\"]`" 3/14 all-bw.R: all_bw(two.let, "a", "zz") [1] TRUE 3/14 all-bw.R: all_bw(two.let, "a", "zz", bounds = "()") [1] "`\"a\"` at index 1 not in `(\"a\",\"zz\")`" 3/14 all-bw.R: all_bw("A", "a", "z", bounds = "(]") [1] "`\"A\"` at index 1 not in `(\"a\",\"z\"]`" 3/14 all-bw.R: two.let.2 <- tail(head(two.let, -1), -1) 3/14 all-bw.R: all_bw(two.let.2, "a", "zz", bounds = "()") [1] TRUE 3/14 all-bw.R: all_bw(two.let.2, "a", "zz", bounds = "[)") [1] TRUE 3/14 all-bw.R: all_bw(two.let.2, "a", "zz", bounds = "(]") [1] TRUE 3/14 all-bw.R: two.let.2[50] <- NA_character_ 3/14 all-bw.R: all_bw(two.let.2, "a", "zz", bounds = "()", na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(two.let.2, "a", "zz", bounds = "[)", na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(two.let.2, "a", "zz", bounds = "(]", na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(two.let, -Inf, Inf, bounds = "()") [1] TRUE 3/14 all-bw.R: all_bw(two.let, -Inf, Inf, bounds = "[)") [1] TRUE 3/14 all-bw.R: all_bw(two.let, -Inf, Inf, bounds = "(]") [1] TRUE 3/14 all-bw.R: all_bw(two.let, -Inf, Inf, bounds = "[]") [1] TRUE 3/14 all-bw.R: all_bw(two.let, "a", Inf, bounds = "()") [1] "`\"a\"` at index 1 not in `(\"a\",Inf)`" 3/14 all-bw.R: all_bw(two.let, "a", Inf, bounds = "[)") [1] TRUE 3/14 all-bw.R: all_bw(two.let, "a", Inf, bounds = "(]") [1] "`\"a\"` at index 1 not in `(\"a\",Inf]`" 3/14 all-bw.R: all_bw(two.let, "a", Inf, bounds = "[]") [1] TRUE 3/14 all-bw.R: all_bw(two.let, "\t", Inf, bounds = "(]") [1] TRUE 3/14 all-bw.R: all_bw(two.let, -Inf, "zz", bounds = "()") [1] "`\"zz\"` at index 702 not in `(-Inf,\"zz\")`" 3/14 all-bw.R: all_bw(two.let, -Inf, "zz", bounds = "[)") [1] "`\"zz\"` at index 702 not in `[-Inf,\"zz\")`" 3/14 all-bw.R: all_bw(two.let, -Inf, "zz", bounds = "(]") [1] TRUE 3/14 all-bw.R: all_bw(two.let, -Inf, "zz", bounds = "[]") [1] TRUE 3/14 all-bw.R: two.let.inf[1] <- Inf 3/14 all-bw.R: two.let.inf[2] <- -Inf 3/14 all-bw.R: all_bw(two.let.inf, -Inf, Inf, bounds = "()") [1] TRUE 3/14 all-bw.R: all_bw(two.let.inf, -Inf, Inf, bounds = "[)") [1] TRUE 3/14 all-bw.R: all_bw(two.let.inf, -Inf, Inf, bounds = "(]") [1] TRUE 3/14 all-bw.R: all_bw(two.let.inf, -Inf, Inf, bounds = "[]") [1] TRUE 3/14 all-bw.R: two.let.na[50] <- NA_character_ 3/14 all-bw.R: all_bw(two.let.na, "a", "zz", bounds = "()") [1] "`\"a\"` at index 1 not in `(\"a\",\"zz\")`" 3/14 all-bw.R: all_bw(two.let.na, "a", "zz", bounds = "[)") [1] "`\"NA\"` at index 50 not in `[\"a\",\"zz\")`" 3/14 all-bw.R: all_bw(two.let.na, "a", "zz", bounds = "(]") [1] "`\"a\"` at index 1 not in `(\"a\",\"zz\"]`" 3/14 all-bw.R: all_bw(two.let.na, "a", "zz", bounds = "[]") [1] "`\"NA\"` at index 50 not in `[\"a\",\"zz\"]`" 3/14 all-bw.R: all_bw(two.let.na, -Inf, Inf, bounds = "[]") [1] "`\"NA\"` at index 50 not in `[-Inf,Inf]`" 3/14 all-bw.R: all_bw(two.let.na, "a", "zz", bounds = "()", na.rm = TRUE) [1] "`\"a\"` at index 1 not in `(\"a\",\"zz\")`" 3/14 all-bw.R: all_bw(two.let.na, "a", "zz", bounds = "[)", na.rm = TRUE) [1] "`\"zz\"` at index 702 not in `[\"a\",\"zz\")`" 3/14 all-bw.R: all_bw(two.let.na, "a", "zz", bounds = "(]", na.rm = TRUE) [1] "`\"a\"` at index 1 not in `(\"a\",\"zz\"]`" 3/14 all-bw.R: all_bw(two.let.na, "a", "zz", na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(two.let.na, "b", "zy", na.rm = TRUE) [1] "`\"a\"` at index 1 not in `[\"b\",\"zy\"]`" 3/14 all-bw.R: all_bw(two.let.na, -Inf, "zz", na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(two.let.na, -Inf, "zy", na.rm = TRUE) [1] "`\"zz\"` at index 702 not in `[-Inf,\"zy\"]`" 3/14 all-bw.R: all_bw(two.let.na, -Inf, "zy") [1] "`\"NA\"` at index 50 not in `[-Inf,\"zy\"]`" 3/14 all-bw.R: all_bw(two.let.na, -Inf, "zzz", bounds = "[)", na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(two.let.na, -Inf, "zz", bounds = "[)", na.rm = TRUE) [1] "`\"zz\"` at index 702 not in `[-Inf,\"zz\")`" 3/14 all-bw.R: all_bw(two.let.na, -Inf, "zz") [1] "`\"NA\"` at index 50 not in `[-Inf,\"zz\"]`" 3/14 all-bw.R: all_bw(two.let.na, "a", Inf, na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(two.let.na, "a", Inf) [1] "`\"NA\"` at index 50 not in `[\"a\",Inf]`" 3/14 all-bw.R: all_bw(two.let.na, "b", Inf, na.rm = TRUE) [1] "`\"a\"` at index 1 not in `[\"b\",Inf]`" 3/14 all-bw.R: all_bw(two.let.na, "\t", Inf, bounds = "(]", na.rm = TRUE) [1] TRUE 3/14 all-bw.R: all_bw(two.let.na, "a", Inf, bounds = "(]", na.rm = TRUE) [1] "`\"a\"` at index 1 not in `(\"a\",Inf]`" 3/14 all-bw.R: all_bw(two.let.na, "a", Inf) [1] "`\"NA\"` at index 50 not in `[\"a\",Inf]`" 3/14 all-bw.R: utf8 <- list(s4 = ("𐀀"), e4 = ("􏿽"), s3 = ("ࠀ"), e3 = ("�"), 3/14 all-bw.R: for (i in seq_along(utf8)) Encoding(utf8[[i]]) <- "UTF-8" 3/14 all-bw.R: all_bw(lorem.ru.phrases, "\t", utf8$e2) [1] TRUE 3/14 all-bw.R: all_bw(lorem.cn.phrases, "\t", utf8$e3) [1] TRUE 4/14 classes.R: 4/14 classes.R: library(vetr) 4/14 classes.R: unitizer_sect("Class Matching", { 4/14 classes.R: obj2 <- structure(numeric()) 4/14 classes.R: obj1 <- structure(numeric(), class = "hello") 4/14 classes.R: alike(obj1, obj2) [1] "`obj2` should be class \"hello\" (is \"numeric\")" 4/14 classes.R: obj2 <- structure(numeric(), class = c(letters[10:12], letters[ 4/14 classes.R: obj1 <- structure(numeric(), class = letters[1:3]) 4/14 classes.R: alike(obj1, obj2) [1] "`class(obj2)[6]` should be \"a\" (is \"c\")" 4/14 classes.R: alike(obj2, obj1) [1] "`class(obj1)[1]` should be \"j\" (is \"a\")" 4/14 classes.R: obj2 <- structure(numeric(), class = c("b", "a", "c")) 4/14 classes.R: alike(obj1, obj2) [1] "`class(obj2)[1]` should be \"a\" (is \"b\")" 4/14 classes.R: obj2 <- structure(numeric(), class = c("a", "b", "x", "c")) 4/14 classes.R: alike(obj1, obj2) [1] "`class(obj2)[2]` should be \"a\" (is \"b\")" 4/14 classes.R: obj2 <- structure(numeric(), class = c("a", "b", "c")) 4/14 classes.R: alike(obj1, obj2) [1] TRUE 4/14 classes.R: obj2 <- structure(numeric(), class = c("x", "a", "b", "c")) 4/14 classes.R: alike(obj1, obj2) [1] TRUE 4/14 classes.R: alike(obj1, obj2, settings = vetr_settings(attr.mode = 1)) [1] "`length(class(obj2))` should be 3 (is 4)" 4/14 classes.R: unitizer_sect("S4", { 4/14 classes.R: x <- new("vetr_foo") 4/14 classes.R: y <- new("vetr_foo") 4/14 classes.R: z <- new("vetr_bar") 4/14 classes.R: v <- new("vetr_baz") 4/14 classes.R: w <- structure(list(a = character(), b = numeric()), class = "v 4/14 classes.R: alike(x, y) [1] TRUE 4/14 classes.R: alike(x, z) [1] "`z` should inherit from S4 class \"vetr_foo\" from pkg:vetr (is \"vetr_bar\" from pkg:vetr)" 4/14 classes.R: alike(x, w) [1] "`w` should be S4" 4/14 classes.R: alike(w, x) [1] "`x` should not be S4" 4/14 classes.R: alike(x, v) [1] TRUE 4/14 classes.R: alike(v, x) [1] "`x` should inherit from S4 class \"vetr_baz\" from pkg:vetr (is \"vetr_foo\" from pkg:vetr)" 4/14 classes.R: lst.2 <- list(list(11, 21), list(31, list(41, list(51, list(61) 4/14 classes.R: lst.5 <- lst.6 <- lst.2 4/14 classes.R: lst.5[[2]][[2]][[1]] <- x 4/14 classes.R: lst.6[[2]][[2]][[1]] <- v 4/14 classes.R: alike(lst.5, lst.6) [1] TRUE 4/14 classes.R: alike(lst.6, lst.5) [1] "`lst.5[[2]][[2]][[1]]` should inherit from S4 class \"vetr_baz\" from pkg:vetr (is \"vetr_foo\" from pkg:vetr)" 4/14 classes.R: v2 <- v 4/14 classes.R: class(v2) <- c("vetr_baz", "vetr_foo") Warning in class(v2) <- c("vetr_baz", "vetr_foo") : Setting class(x) to multiple strings ("vetr_baz", "vetr_foo", ...); result will no longer be an S4 object 4/14 classes.R: alike(x, v2) [1] "`v2` should be S4" 4/14 classes.R: inherits <- function(x, y) stop("pwned!!!") 4/14 classes.R: alike(y, v) [1] TRUE 4/14 classes.R: unitizer_sect("R5", { 4/14 classes.R: Foo.1 <- vetr:::Foo$new() 4/14 classes.R: Foo.2 <- vetr:::Foo$new() 4/14 classes.R: Bar.1 <- vetr:::Bar$new() 4/14 classes.R: alike(Foo.1, Foo.2) [1] TRUE 4/14 classes.R: alike(Foo.1, Bar.1) [1] "`Bar.1` should inherit from S4 class \"Foo\" from pkg:vetr (is \"Bar\" from pkg:vetr)" 4/14 classes.R: unitizer_sect("Non-Standard Class", { 4/14 classes.R: var.1 <- list(1, 2, 3) 4/14 classes.R: var.2 <- list("hello", list(1, 2, 3), 5) 4/14 classes.R: class(var.1) <- "marbles" 4/14 classes.R: class(var.2) <- "marbles" 4/14 classes.R: alike(var.1, var.2) [1] "`var.2[[1]]` should be type \"numeric\" (is \"character\")" 5/14 cstringr.R: 5/14 cstringr.R: library(vetr) 5/14 cstringr.R: unitizer_sect("Basic Tests", { 5/14 cstringr.R: vetr:::len_chr_len(1000L) [1] 4 5/14 cstringr.R: vetr:::len_chr_len(1L) [1] 1 5/14 cstringr.R: vetr:::len_chr_len(1234567890L) [1] 10 5/14 cstringr.R: len0 <- 1.23456789e+24 5/14 cstringr.R: vetr:::len_chr_len(len0) Error in vetr:::len_chr_len(len0) : Argument `maxlen` must be a positive scalar integer Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: vetr:::len_as_chr(1000L) [1] "1000" 5/14 cstringr.R: vetr:::len_as_chr(1L) [1] "1" 5/14 cstringr.R: vetr:::len_as_chr(1234567890L) [1] "1234567890" 5/14 cstringr.R: vetr:::len_as_chr(len0) Error in vetr:::len_as_chr(len0) : Argument `maxlen` must be a positive scalar integer Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: identical(vetr:::strmlen(lorem), nchar(lorem)) [1] TRUE 5/14 cstringr.R: vetr:::strmlen(lorem, 100L) Error in vetr:::strmlen(lorem, 100L) : Internal Error (CSR_strmlen): failed to find string terminator prior to maxlen 100 characters Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: identical(vetr:::strmcpy(lorem), lorem) [1] TRUE 5/14 cstringr.R: vetr:::strmcpy("") [1] "" 5/14 cstringr.R: vetr:::strmcpy(lorem, 20L) Warning in vetr:::strmcpy(lorem, 20L) : CSR_strmcpy: truncated string longer than 20 [1] "Lorem ipsum dolor si" 5/14 cstringr.R: identical(nchar(vetr:::strmcpy(lorem, 20L)), 20L) Warning in vetr:::strmcpy(lorem, 20L) : CSR_strmcpy: truncated string longer than 20 [1] TRUE 5/14 cstringr.R: vetr:::smprintf2("%s %s", lorem, lorem, 10L) Warning in vetr:::smprintf2("%s %s", lorem, lorem, 10L) : CSR_strmcpy: truncated string longer than 10 Warning in vetr:::smprintf2("%s %s", lorem, lorem, 10L) : CSR_strmcpy: truncated string longer than 10 [1] "Lorem ipsu Lorem ipsu" 5/14 cstringr.R: vetr:::smprintf2("%s %s hello world there", lorem, lorem, 10L) Error in vetr:::smprintf2("%s %s hello world there", lorem, lorem, 10L) : Internal Error: formatting string length longer that `nchar.max` contact maintainer., Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: (lorem) [1] "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." 5/14 cstringr.R: vetr:::ucfirst("hello WORLD") [1] "Hello WORLD" 5/14 cstringr.R: vetr:::lcfirst("HELLO world") [1] "hELLO world" 5/14 cstringr.R: vetr:::strbullet(c("hello world\nhow are things today", "once [1] "- hello world\n how are things today" [2] "- once upon a time\n lived a funny duck" 5/14 cstringr.R: vetr:::strbullet("hello\nblah\n", bullet = " - ", ctd = " [1] " - hello\n blah\n" 5/14 cstringr.R: vetr:::strbullet(1:10) Error in vetr:::strbullet(1:10) : First three arguments must be string Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: vetr:::collapse(letters[1:5]) [1] "abcde" 5/14 cstringr.R: vetr:::collapse(letters[1:5], sep = "\n") [1] "a\nb\nc\nd\ne" 5/14 cstringr.R: vetr:::collapse(character()) [1] "" 5/14 cstringr.R: unitizer_sect("numbers as character", { 5/14 cstringr.R: vetr:::num_as_chr(100) [1] "100" 5/14 cstringr.R: vetr:::num_as_chr(100.01) [1] "100.010000" 5/14 cstringr.R: num0 <- 1e+09 + 0.1 5/14 cstringr.R: num1 <- -1e+09 - 0.1 5/14 cstringr.R: sub("e[+-]?\\K0*", "", vetr:::num_as_chr(num0), perl = TRUE) [1] "1.000000e+9" 5/14 cstringr.R: sub("e[+-]?\\K0*", "", vetr:::num_as_chr(num1), perl = TRUE) [1] "-1.000000e+9" 5/14 cstringr.R: vetr:::num_as_chr(num0, as.int = TRUE) [1] "1000000000" 5/14 cstringr.R: vetr:::num_as_chr(num1, as.int = TRUE) [1] "-1000000000" 5/14 cstringr.R: num2 <- 1e+09 - 0.1 5/14 cstringr.R: num3 <- -(1e+09 - 0.1) 5/14 cstringr.R: vetr:::num_as_chr(num2) [1] "999999999.900000" 5/14 cstringr.R: vetr:::num_as_chr(num3) [1] "-999999999.900000" 5/14 cstringr.R: vetr:::num_as_chr(NA) [1] "NA" 5/14 cstringr.R: vetr:::num_as_chr(NaN) [1] "NaN" 5/14 cstringr.R: vetr:::num_as_chr(Inf) [1] "Inf" 5/14 cstringr.R: vetr:::num_as_chr(-Inf) [1] "-Inf" 5/14 cstringr.R: unitizer_sect("smprintf6", { 5/14 cstringr.R: vetr:::smprintf6("%s %s %s %s %s %s", "a", "bb", "ccc", "dddd" [1] "a bb ccc dddd eeeee ffffff" 5/14 cstringr.R: vetr:::smprintf6("%s %s %s %s %s %s", "a", "bb", "ccc", "dddd" Error in vetr:::smprintf6("%s %s %s %s %s %s", "a", "bb", "ccc", "dddd", : Internal Error: formatting string length longer that `nchar.max` contact maintainer., Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: vetr:::smprintf6("%s %s %s %s %s %s", "a", "bb", "ccc", "dddd" [1] "a bb ccc dddd eeeee ffffff" 5/14 cstringr.R: vetr:::smprintf6("%s %s %s %s", "a", "bb", "ccc", "dddd", "eee [1] "a bb ccc dddd" 5/14 cstringr.R: unitizer_sect("Corner Cases", { 5/14 cstringr.R: vetr:::strbullet(c("hello world"), maxlen = 5L) Error in vetr:::strbullet(c("hello world"), maxlen = 5L) : Exceeded `max_len` when trying to bullet `string` Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: vetr:::strbullet(c("hello world"), maxlen = 12L) Error in vetr:::strbullet(c("hello world"), maxlen = 12L) : Exceeded `max_len` when trying to bullet `string` (2) Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: vetr:::strbullet(c("hello world"), maxlen = 14L) [1] "- hello world" 5/14 cstringr.R: (vetr:::test_strmcpy()) Error in vetr:::test_strmcpy() : Argument `maxlen` must be at least one smaller than SIZE_MAX. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: vetr:::test_strappend() Error in vetr:::test_strappend() : Argument `maxlen` must be at least one smaller than max possible size_t value. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: vetr:::test_add_szt() Error in vetr:::test_add_szt() : size_t overflow: you tried to add two size_t numbers that together overflow size_t Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: vetr:::strmlen(list(), 100L) Error in vetr:::strmlen(list(), 100L) : Argument `str` must be a scalar character Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: (vetr:::test_smprintfx()) [1] "a b c d\na b c\na b\na\n" 5/14 cstringr.R: (vetr:::test_strappend2()) Warning in vetr:::test_strappend2() : CSR_strmcopy: truncated string longer than 5 NULL 5/14 cstringr.R: unitizer_sect("substr", { 5/14 cstringr.R: vetr:::strsub(lorem.phrases, 25L, TRUE) [1] "Lorem ipsum dolor sit a.." "consectetur adipiscing .." [3] "sed do eiusmod tempor i.." "Ut enim ad minim veniam," [5] "quis nostrud exercitati.." "Duis aute irure dolor i.." [7] "Excepteur sint occaecat.." "sunt in culpa qui offic.." 5/14 cstringr.R: vetr:::strsub(lorem.phrases, 25L, FALSE) [1] "Lorem ipsum dolor sit ame" "consectetur adipiscing el" [3] "sed do eiusmod tempor inc" "Ut enim ad minim veniam," [5] "quis nostrud exercitation" "Duis aute irure dolor in " [7] "Excepteur sint occaecat c" "sunt in culpa qui officia" 5/14 cstringr.R: vetr:::strsub(lorem.tr.phrases, 25L, TRUE) [1] "Bu tartışmalı tarihsel .." "Stalin'e düşman veya St.." [3] "Stalin karşıtlarının te.." "Hitlerle aralarındaki a.." [5] "Estonya," "Letonya," [7] "Litvanya," "Romanya ve Polonya'nin .." [9] "Stalin'in doğru yaptığı.." "1937'deki Münih görüşme.." [11] "İngiliz ve Fransız empe.." "Nazileri kışkırtıyorlar.." [13] "Bu amaçla Avusturya'nın.." "özellikle Çekoslovakya'.." [15] "Böylece Sovyetler Birli.." "kendi sınırlarını güven.." [17] "Stalin'in amaçlarına gö.." "Polonya ve Baltık ülkel.." [19] "Nazilerin Sovyetler Bir.." "Böylece 1939 yılında Na.." [21] "Litvanya ve Letonya'yı .." "Finlandiya'ya saldırdı .." [23] "1941'de Hitler'in Sovye.." "II." [25] "Dünya Savaşı'nın en ağı.." 5/14 cstringr.R: vetr:::strsub(lorem.tr.phrases, 25L, FALSE) [1] "Bu tartışmalı tarihsel dö" "Stalin'e düşman veya Stal" [3] "Stalin karşıtlarının tezl" "Hitlerle aralarındaki açı" [5] "Estonya," "Letonya," [7] "Litvanya," "Romanya ve Polonya'nin Na" [9] "Stalin'in doğru yaptığını" "1937'deki Münih görüşmele" [11] "İngiliz ve Fransız empery" "Nazileri kışkırtıyorlardı" [13] "Bu amaçla Avusturya'nın A" "özellikle Çekoslovakya'nı" [15] "Böylece Sovyetler Birliği" "kendi sınırlarını güvence" [17] "Stalin'in amaçlarına göre" "Polonya ve Baltık ülkeler" [19] "Nazilerin Sovyetler Birli" "Böylece 1939 yılında Nazi" [21] "Litvanya ve Letonya'yı sı" "Finlandiya'ya saldırdı ve" [23] "1941'de Hitler'in Sovyetl" "II." [25] "Dünya Savaşı'nın en ağır " 5/14 cstringr.R: vetr:::strsub(lorem.ru.phrases, 25L, TRUE) [1] "Родился 6 (18) декабря .." "Позже она подтверждалас.." [3] "хотя начиная с 1929 год.." "Был третьим сыном в сем.." [5] "первые двое умерли в мл.." "Его родным языком был г.." [7] "русский язык Сталин выу.." "но всегда говорил с зам.." [9] "Согласно утверждениям д.." "Сталин," [11] "однако," "пел по-русски практичес.." 5/14 cstringr.R: vetr:::strsub(lorem.ru.phrases, 25L, FALSE) [1] "Родился 6 (18) декабря 18" "Позже она подтверждалась " [3] "хотя начиная с 1929 года[" "Был третьим сыном в семье" [5] "первые двое умерли в млад" "Его родным языком был гру" [7] "русский язык Сталин выучи" "но всегда говорил с замет" [9] "Согласно утверждениям доч" "Сталин," [11] "однако," "пел по-русски практически" 5/14 cstringr.R: vetr:::strsub(lorem.cn.phrases, 25L, TRUE) [1] "中華人民共和國是單一制的多民族國家。" [2] "全國劃分為23個省(其中台灣省并沒有實際管辖)、" [3] "5個自治區、" [4] "4個直轄市和2個根據一國兩制設立的特別行政區,.." [5] "中华人民共和国跨越五个地理时区,但全国均使用北.." [6] "中華人民共和國官方認定的民族現有56個,其中最.." [7] "维吾尔族、" [8] "滿族、" [9] "蒙古族、" [10] "藏族、" [11] "朝鲜族等也多使用自己的語言與文字。" [12] "主要宗教有佛教、" [13] "道教、" [14] "基督教(多指新教)、" [15] "天主教和伊斯兰教等,但過半人口無特定宗教信仰。" [16] "中华人民共和国的通用语言是汉语普通話,當中在中.." 5/14 cstringr.R: vetr:::strsub(lorem.cn.phrases, 25L, FALSE) [1] "中華人民共和國是單一制的多民族國家。" [2] "全國劃分為23個省(其中台灣省并沒有實際管辖)、" [3] "5個自治區、" [4] "4個直轄市和2個根據一國兩制設立的特別行政區,均直" [5] "中华人民共和国跨越五个地理时区,但全国均使用北京时" [6] "中華人民共和國官方認定的民族現有56個,其中最大民" [7] "维吾尔族、" [8] "滿族、" [9] "蒙古族、" [10] "藏族、" [11] "朝鲜族等也多使用自己的語言與文字。" [12] "主要宗教有佛教、" [13] "道教、" [14] "基督教(多指新教)、" [15] "天主教和伊斯兰教等,但過半人口無特定宗教信仰。" [16] "中华人民共和国的通用语言是汉语普通話,當中在中國大" 5/14 cstringr.R: vetr:::strsub(lorem.phrases, 1:2, TRUE) Error in vetr:::strsub(lorem.phrases, 1:2, TRUE) : Argument `chars` must be scalar integer, strictly positive, and not NA. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: vetr:::strsub(lorem.phrases, 25L, 1:2) Error in vetr:::strsub(lorem.phrases, 25L, 1:2) : Argument `mark_trunc` must be a TRUE or FALSE. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: vetr:::strsub(1:2, 25L, TRUE) Error in vetr:::strsub(1:2, 25L, TRUE) : Argument `string` must be a string. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: vetr:::strsub(lorem.phrases, 2L, TRUE) Error in vetr:::strsub(lorem.phrases, 2L, TRUE) : Argument `chars` must be greater than 2 when `mark_trunc` is TRUE. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: vetr:::strsub(lorem.phrases, 3L, TRUE) [1] "L.." "c.." "s.." "U.." "q.." "D.." "E.." "s.." 5/14 cstringr.R: unitizer_sect("nchar_u", { 5/14 cstringr.R: vetr:::nchar_u(1:10) Error in vetr:::nchar_u(1:10) : Argument `string` must be a character vector. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: vetr:::nchar_u(c("a", "ab", "abc")) [1] 1 2 3 5/14 cstringr.R: unitizer_sect("char_offsets", { 5/14 cstringr.R: vetr:::char_offsets(1:10) Error in vetr:::char_offsets(1:10) : Argument `string` must be a character vector. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: vetr:::char_offsets(c("a", "ab", "abc")) Error in vetr:::char_offsets(c("a", "ab", "abc")) : Argument `string` must be scalar. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 5/14 cstringr.R: unitizer_sect("UTF8 corner cases, in UTF-8", { 5/14 cstringr.R: utf8.kuhn <- readLines("unitizer/helper/UTF-8-test.txt", encod Warning in readLines("unitizer/helper/UTF-8-test.txt", encoding = "UTF-8") : line 91 appears to contain an embedded nul 5/14 cstringr.R: test.start <- grep("^Here come the tests:", utf8.kuhn, useByte 5/14 cstringr.R: test.start [1] 81 5/14 cstringr.R: utf8.test <- tail(utf8.kuhn, -test.start) 5/14 cstringr.R: nchar.base <- nchar(utf8.test, allowNA = TRUE) 5/14 cstringr.R: untranslatable <- is.na(nchar.base) 5/14 cstringr.R: nchar.vetr <- vetr:::nchar_u(utf8.test) 5/14 cstringr.R: base.vetr.diff <- !is.na(nchar.base) & nchar.vetr != nchar.bas 5/14 cstringr.R: source("unitizer/helper/UTF-8-unicode-10-ex.R", local = TRUE) 5/14 cstringr.R: vetr:::nchar_u(unicode.10[1]) [1] 3 5/14 cstringr.R: vetr:::nchar_u(unicode.10[2]) [1] 2 5/14 cstringr.R: vetr:::nchar_u(unicode.10[3]) [1] 3 5/14 cstringr.R: vetr:::nchar_u(unicode.10[4]) [1] 10 5/14 cstringr.R: vetr:::char_offsets(unicode.10[4]) [1] 1 -3 -2 -1 1 -1 1 -1 -1 1 5/14 cstringr.R: source("unitizer/helper/UTF-8-critical.R", local = TRUE) 5/14 cstringr.R: Map(vetr:::char_offsets, crit.1) $n.0 [1] 1 $y.1 [1] -1 5/14 cstringr.R: Map(vetr:::char_offsets, crit.2) $n.0 [1] -1 -1 $n.1 [1] -1 1 $y.2 [1] 2 $y.3 [1] 2 $n.4 [1] -1 -1 5/14 cstringr.R: Map(vetr:::char_offsets, crit.3) $n.00 [1] -1 -1 -1 $n.01 [1] -2 1 $y.02 [1] 3 $y.03 [1] 3 $n.04 [1] -2 -1 $n.05 [1] -1 1 -1 $y.06 [1] 3 $y.07 [1] 3 $n.08 [1] -2 -1 $n.10 [1] -1 -1 -1 $n.11 [1] -1 1 -1 $n.12 [1] -2 1 $y.13 [1] 3 $y.14 [1] 3 $n.16 [1] -2 -1 $n.17 [1] -1 -1 -1 $n.18 [1] -2 1 $n.19 [1] -1 1 -1 $y.20 [1] 3 $y.21 [1] 3 $n.22 [1] -2 -1 $n.23 [1] -1 -1 -1 5/14 cstringr.R: Map(vetr:::char_offsets, crit.4) $n.00 [1] -1 -1 -1 -1 $n.01 [1] -2 1 -1 $n.02 [1] -3 1 $y.03 [1] 4 $y.04 [1] 4 $n.06 [1] -3 -1 $n.07 [1] -2 -1 -1 $n.08 [1] -1 -1 -1 -1 $n.09 [1] -3 1 $n.10 [1] -2 1 -1 $n.11 [1] -1 1 -1 -1 $y.12 [1] 4 $y.13 [1] 4 $n.14 [1] -3 -1 $n.15 [1] -2 -1 -1 $n.16 [1] -1 -1 -1 -1 $n.17 [1] -3 1 $n.18 [1] -2 1 -1 $n.19 [1] -1 1 -1 -1 $y.20 [1] 4 $y.21 [1] 4 $n.22 [1] -3 -1 $n.23 [1] -2 -1 -1 $n.24 [1] -1 -1 1 1 $n.25 [1] -1 -1 -1 -1 5/14 cstringr.R: unitizer_sect("UTF-8 corner cases - other encodings", { 5/14 cstringr.R: source("unitizer/helper/latin-1.R", local = TRUE) 5/14 cstringr.R: lapply(lat.1.1, vetr:::char_offsets) [[1]] [1] 1 1 2 1 [[2]] [1] 1 1 1 1 1 [[3]] [1] 2 1 2 1 2 1 2 1 2 5/14 cstringr.R: lapply(lat.1.2, vetr:::char_offsets) [[1]] [1] 1 1 1 1 [[2]] [1] 1 1 1 1 1 [[3]] [1] 1 1 1 1 1 1 1 1 1 5/14 cstringr.R: vetr:::strsub(lat.1.1, 3L, mark = FALSE) [1] "niñ" "hel" "µ ¶" 5/14 cstringr.R: vetr:::strsub(lat.1.2, 3L, mark = FALSE) [1] "ni\\xf1" "hel" "\\xb5 \\xb6" 6/14 eval.R: 6/14 eval.R: library(vetr) 6/14 eval.R: unitizer_sect("evaluate", { 6/14 eval.R: vetr:::eval_check(quote(logical(2L)), quote(xyz), 1:2) [[1]] [1] "`xyz`" "be" "type \"logical\"" "is" [5] "\"integer\"" 6/14 eval.R: vetr:::eval_check(quote(logical(2L)), quote(xyz), c(TRUE, FALSE)) list() 6/14 eval.R: vetr:::eval_check(quote(logical(2L)), quote(xyz), c(TRUE, FALSE, [[1]] [1] "`length(xyz)`" "be" "2" "is" [5] "3" 6/14 eval.R: vetr:::eval_check(quote(logical(2L) || NULL), quote(xyz), 1:2) [[1]] [1] "`xyz`" "be" "type \"logical\"" "is" [5] "\"integer\"" [[2]] [1] "`xyz`" "be" "`NULL`" "is" "\"integer\"" 6/14 eval.R: vetr:::eval_check(quote(logical(2L) || NULL), quote(xyz), NULL) list() 6/14 eval.R: vetr:::eval_check(quote(logical(2L) || NULL), quote(xyz), c(TRUE, list() 6/14 eval.R: vetr:::eval_check(quote(matrix(integer(), nrow = 3) || NULL), list() 6/14 eval.R: vetr:::eval_check(quote(matrix(integer(), nrow = 3) || NULL), [[1]] [1] "`xyz`" "be" "\"matrix\"" "is" "\"integer\"" [[2]] [1] "`xyz`" "be" "`NULL`" "is" "\"integer\"" 6/14 eval.R: vetr:::eval_check(quote(matrix(integer(), nrow = 3) || vector("lis [[1]] [1] "`xyz`" "be" "\"matrix\"" "is" "\"list\"" [[2]] [1] "`length(xyz)`" "be" "2" "is" [5] "1" 6/14 eval.R: vetr:::eval_check(quote(matrix(integer(), nrow = 3) || vector("lis list() 6/14 eval.R: vetr:::eval_check(quote(matrix(integer(), nrow = 3) || list(charac [[1]] [1] "`xyz`" "be" "\"matrix\"" "is" "\"list\"" [[2]] [1] "`xyz[[2]]`" "be" "type \"integer-like\"" [4] "is" "\"character\"" 6/14 eval.R: unitizer_sect("evaluate with sub", { 6/14 eval.R: xyz <- c(TRUE, TRUE) 6/14 eval.R: vetr:::eval_check(quote(logical(2L) && .(all(xyz))), quote(xyz), Error in vetr:::eval_check(quote(logical(2L) && .(all(xyz))), quote(xyz), : vet/vetr usage error: found symbol `xyz` in vetting token for object with the same symbol. Please use `.` to reference the object being checked by the vetting token (e.g. use `vet(. > 0, x)` instead of `vet(x > 0, x)`) Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 6/14 eval.R: vetr:::eval_check(quote(logical(2L) && .(all(.))), quote(xyz), list() 6/14 eval.R: vetr:::eval_check(quote(logical(2L) && .(!any(is.na(.)))), quote(x list() 6/14 eval.R: xyz <- c(TRUE, NA) 6/14 eval.R: vetr:::eval_check(quote(logical(2L) && .(!any(is.na(.)))), quote(x [[1]] [1] "`!any(is.na(xyz))` is not TRUE (FALSE)" 6/14 eval.R: xyz <- c(TRUE, FALSE, TRUE) 6/14 eval.R: vetr:::eval_check(quote(logical(2L) && .(!any(is.na(.)))), quote(x [[1]] [1] "`length(xyz)`" "be" "2" "is" [5] "3" 6/14 eval.R: abc1 <- letters[1:5] 6/14 eval.R: vetr:::eval_check(quote(character(5L) && .(all(. %in% letters[1:3] [[1]] [1] "`all(abc1 %in% letters[1:3])` is not TRUE (FALSE)" 6/14 eval.R: abc2 <- rep("a", 5) 6/14 eval.R: vetr:::eval_check(quote(character(5L) && .(all(. %in% letters[1:3] list() 6/14 eval.R: mat1 <- matrix(1:30, ncol = 3) 6/14 eval.R: vetr:::eval_check(quote((matrix(numeric(), ncol = 3) || matrix(int list() 6/14 eval.R: mat2 <- matrix(1:120, ncol = 3) 6/14 eval.R: vetr:::eval_check(quote((matrix(numeric(), ncol = 3) || matrix(int [[1]] [1] "`length(mat2) < 100` is not TRUE (FALSE)" 6/14 eval.R: mat3 <- LETTERS[1:9] 6/14 eval.R: vetr:::eval_check(quote((matrix(numeric(), ncol = 3) || matrix(int [[1]] [1] "`mat3`" "be" "\"matrix\"" "is" [5] "\"character\"" [[2]] [1] "`mat3`" "be" "\"matrix\"" "is" [5] "\"character\"" [[3]] [1] "`length(mat3)`" "be" "10" "is" [5] "9" 6/14 eval.R: vetr:::eval_check(quote(matrix(numeric(), ncol = 3) || matrix(inte [[1]] [1] "`mat3`" "be" "\"matrix\"" "is" [5] "\"character\"" [[2]] [1] "`mat3`" "be" "\"matrix\"" "is" [5] "\"character\"" [[3]] [1] "`length(mat3)`" "be" "10" "is" [5] "9" [[4]] [1] "`length(mat3) > 20` is not TRUE (FALSE)" 6/14 eval.R: unitizer_sect("custom expressions", { 6/14 eval.R: x <- -1:1 6/14 eval.R: y <- 1 6/14 eval.R: z <- -1 6/14 eval.R: w <- NA_integer_ 6/14 eval.R: u <- integer() 6/14 eval.R: t <- 1:3 6/14 eval.R: vetr:::eval_check(quote(. > 0), quote(x), x) [[1]] [1] "`x > 0` is not all TRUE (contains non-TRUE values)" 6/14 eval.R: vetr:::eval_check(quote(. > 0), quote(y), y) list() 6/14 eval.R: vetr:::eval_check(quote(. > 0), quote(z), z) [[1]] [1] "`z > 0` is not TRUE (FALSE)" 6/14 eval.R: vetr:::eval_check(quote(. > 0), quote(t), t) list() 6/14 eval.R: vetr:::eval_check(quote(. > 0), quote(w), w) [[1]] [1] "`w > 0` is not TRUE (NA)" 6/14 eval.R: vetr:::eval_check(quote(. > 0), quote(u), u) list() 6/14 eval.R: unitizer_sect("Errors", { 6/14 eval.R: vetr:::eval_check(1:3, 1:3, TRUE, env = list(1:3)) Error in vetr:::eval_check(1:3, 1:3, TRUE, env = list(1:3)) : `vet/vetr` usage error: argument `env` must be an environment. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 6/14 eval.R: vetr:::eval_check(quote(y), quote(x), TRUE, env = list(1:3)) Error in vetr:::eval_check(quote(y), quote(x), TRUE, env = list(1:3)) : `vet/vetr` usage error: argument `env` must be an environment. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 7/14 internal.R: 7/14 internal.R: library(vetr) 7/14 internal.R: unitizer_sect("Name like attributes", { 7/14 internal.R: vetr:::name_compare(c("", "hello"), c("abc", "hello")) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::name_compare(c("ab", "hello"), c("abc", "hello")) $success [1] 0 $message $message$message [1] "be" "\"ab\"" "is" "\"abc\"" $message$wrap $message$wrap[[1]] NULL[1] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $message$wrap[[2]][[2]] [1] 1 $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::name_compare(c(NA_character_, "hello"), c("abc", "hello $success [1] 0 $message $message$message [1] "be" "\"NA\"" "is" "\"abc\"" $message$wrap $message$wrap[[1]] NULL[1] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $message$wrap[[2]][[2]] [1] 1 $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::name_compare(c("ab", "hello"), c(NA_character_, "hello" $success [1] 0 $message $message$message [1] "be" "\"ab\"" "is" "\"NA\"" $message$wrap $message$wrap[[1]] NULL[1] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $message$wrap[[2]][[2]] [1] 1 $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::name_compare(c(NA_character_, "hello"), c(NA_character_ $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::name_compare(1:3, 3:1) $success [1] 0 $message $message$message [1] "be" "identical to target" "" [4] "" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: unitizer_sect("S3 Classes", { 7/14 internal.R: class1 <- letters[1:5] 7/14 internal.R: class2 <- letters[3:5] 7/14 internal.R: class3 <- letters[c(4, 3, 5)] 7/14 internal.R: class4 <- character() 7/14 internal.R: class5 <- NULL 7/14 internal.R: class6 <- list("a", "b", "c") 7/14 internal.R: vetr:::class_compare(class2, class1, 0) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::class_compare(class1, class2, 0) $success [1] 0 $message $message$message [1] "be" "\"a\"" "is" "\"c\"" $message$wrap $message$wrap[[1]] class(NULL)[1] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::class_compare(class1, class1[1:3], 0) $success [1] 0 $message $message$message [1] "inherit" "from class \"d\"" "" "" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::class_compare(class3, class2, 0) $success [1] 0 $message $message$message [1] "be" "\"d\"" "is" "\"c\"" $message$wrap $message$wrap[[1]] class(NULL)[1] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::class_compare(class3, class1, 0) $success [1] 0 $message $message$message [1] "be" "\"d\"" "is" "\"c\"" $message$wrap $message$wrap[[1]] class(NULL)[3] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::class_compare(class5, class2, 0) $success [1] 0 $message $message$message [1] "be" [2] "`alike` the corresponding element in target" [3] "" [4] "" $message$wrap $message$wrap[[1]] class(NULL) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::class_compare(class2, class5, 0) $success [1] 0 $message $message$message [1] "be" [2] "`alike` the corresponding element in target" [3] "" [4] "" $message$wrap $message$wrap[[1]] class(NULL) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::class_compare(class5, class5, 0) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::class_compare(class6, class2, 0) $success [1] 0 $message $message$message [1] "be" [2] "`alike` the corresponding element in target" [3] "" [4] "" $message$wrap $message$wrap[[1]] class(NULL) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::class_compare(class2, class6, 0) $success [1] 0 $message $message$message [1] "be" [2] "`alike` the corresponding element in target" [3] "" [4] "" $message$wrap $message$wrap[[1]] class(NULL) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: class7 <- c("a", "data.frame") 7/14 internal.R: vetr:::class_compare(class7, class1, 0) $success [1] 0 $message $message$message [1] "be" "\"a\"" "is" "\"d\"" $message$wrap $message$wrap[[1]] class(NULL)[4] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 1 $lvl [1] 0 7/14 internal.R: vetr:::class_compare(class1, class7, 0) $success [1] 0 $message $message$message [1] "be" "\"b\"" "is" "\"data.frame\"" $message$wrap $message$wrap[[1]] class(NULL)[2] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: unitizer_sect("Dimnames", { 7/14 internal.R: dimn1 <- list(NULL, NULL, NULL) 7/14 internal.R: dimn2 <- list(a = letters[1:3], b = letters[4:6], c = letters[ 7/14 internal.R: dimn3 <- list(letters[1:3], b = letters[4:6], c = letters[7:9] 7/14 internal.R: dimn4 <- list(letters[1:3], B = letters[4:6], C = letters[7:9] 7/14 internal.R: dimn5 <- list(a = LETTERS[1:3], b = letters[4:6], c = letters[ 7/14 internal.R: dimn6 <- list(a = "", b = letters[4:6], c = letters[7:9]) 7/14 internal.R: dimn7 <- list() 7/14 internal.R: dimn8 <- list(a = LETTERS[1:3], b = letters[4:6], c = letters[ 7/14 internal.R: dimn9 <- list(a = 1:3, b = letters[4:6], c = letters[7:9]) 7/14 internal.R: dimn10 <- list(a = list("a", "b", "c"), b = letters[4:6], c = 7/14 internal.R: dimn11 <- NULL 7/14 internal.R: dimn12 <- matrix(letters[1:9], nrow = 3) 7/14 internal.R: dimn13 <- `attr<-`(dimn2, "bar", "yowza") 7/14 internal.R: dimn14 <- `attr<-`(dimn2, "bar", "yowz") 7/14 internal.R: dimn15 <- list(a = letters[1:3], b = letters[1:3]) 7/14 internal.R: dimn16 <- list(a = letters[1:3], b = letters[1:3]) 7/14 internal.R: attr(dimn15, "a") <- 1:2 7/14 internal.R: attr(dimn16, "a") <- 1:3 7/14 internal.R: dimn17 <- list(a = letters[1:3]) 7/14 internal.R: dimn18 <- list(a = letters[1:2], b = letters[1:3]) 7/14 internal.R: vetr:::dimname_compare(dimn3, dimn2) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn2, dimn3) $success [1] 0 $message $message$message [1] "be" "\"a\"" "is" "\"\"" $message$wrap $message$wrap[[1]] names(dimnames(NULL))[1] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn3, dimn4) $success [1] 0 $message $message$message [1] "be" "\"b\"" "is" "\"B\"" $message$wrap $message$wrap[[1]] names(dimnames(NULL))[2] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn2, dimn5) $success [1] 0 $message $message$message [1] "be" "\"a\"" "is" "\"A\"" $message$wrap $message$wrap[[1]] dimnames(NULL)[[1]][1] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn6, dimn5) $success [1] 0 $message $message$message [1] "be" "1" "is" "3" $message$wrap $message$wrap[[1]] length(dimnames(NULL)[[1]]) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn5, dimn6) $success [1] 0 $message $message$message [1] "be" "3" "is" "1" $message$wrap $message$wrap[[1]] length(dimnames(NULL)[[1]]) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn2, dimn1) $success [1] 0 $message $message$message [1] "have" "attribute \"names\"" "" [4] "" $message$wrap $message$wrap[[1]] dimnames(NULL) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn1, dimn2) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn11, dimn2) $success [1] 0 $message $message$message [1] "be" "`NULL`" "is" "\"list\"" $message$wrap $message$wrap[[1]] dimnames(NULL) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn11, dimn11) $success [1] 0 $message $message$message [1] "have" "a \"dimnames\" attribute" [3] "" "" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn7, dimn2) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn2, dimn7) $success [1] 0 $message $message$message [1] "be" "3" "is" "0" $message$wrap $message$wrap[[1]] length(dimnames(NULL)) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn7, dimn7) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn5, dimn8) $success [1] 0 $message $message$message [1] "be" "3" "is" "4" $message$wrap $message$wrap[[1]] length(dimnames(NULL)) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn8, dimn5) $success [1] 0 $message $message$message [1] "be" "4" "is" "3" $message$wrap $message$wrap[[1]] length(dimnames(NULL)) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn9, dimn2) $success [1] 0 $message $message$message [1] "be" "type \"integer-like\"" "is" [4] "\"character\"" $message$wrap $message$wrap[[1]] dimnames(NULL)[[1]] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn2, dimn9) $success [1] 0 $message $message$message [1] "be" "type \"character\"" "is" [4] "\"integer\"" $message$wrap $message$wrap[[1]] dimnames(NULL)[[1]] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn2, dimn12) $success [1] 0 $message $message$message [1] "be" "type \"list\"" "is" "\"character\"" $message$wrap $message$wrap[[1]] dimnames(NULL) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn12, dimn12) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn2, dimn13) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn13, dimn2) $success [1] 0 $message $message$message [1] "not be" "missing" "" "" $message$wrap $message$wrap[[1]] attr(dimnames(NULL), "bar") $message$wrap[[2]] $message$wrap[[2]][[1]] [1] "bar" $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn13, dimn14) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn14, dimn13) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn15, dimn16) $success [1] 0 $message $message$message [1] "be" "2" "is" "3" $message$wrap $message$wrap[[1]] length(attr(dimnames(NULL), "a")) $message$wrap[[2]] $message$wrap[[2]][[1]] [1] "a" $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dimname_compare(dimn17, dimn18) $success [1] 0 $message $message$message [1] "be" "1" "is" "2" $message$wrap $message$wrap[[1]] length(dimnames(NULL)) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: unitizer_sect("Dims", { 7/14 internal.R: dim1 <- rep(2L, 2) 7/14 internal.R: dim2 <- rep(2L, 3) 7/14 internal.R: dim3 <- rep(2L, 4) 7/14 internal.R: dim4 <- c(1L, 1L) 7/14 internal.R: dim5 <- 2L 7/14 internal.R: dim6 <- c(1L, 2L, 3L) 7/14 internal.R: dim7 <- rep(0L, 2) 7/14 internal.R: dim8 <- c(0L, 0L, 2L) 7/14 internal.R: dim9 <- NULL 7/14 internal.R: dim10 <- letters[1:2] 7/14 internal.R: dim11 <- list(2L, 2L) 7/14 internal.R: vetr:::dim_compare(dim1, dim2) $success [1] 0 $message $message$message [1] "be" "\"matrix\"" "is" "\"array\"" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 1 7/14 internal.R: vetr:::dim_compare(dim2, dim3) $success [1] 0 $message $message$message [1] "have" "3 dimensions" "has" "4" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dim_compare(dim1, dim4) $success [1] 0 $message $message$message [1] "have" "2 rows" "has" "1" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dim_compare(dim2, dim6) $success [1] 0 $message $message$message [1] "have" "size 2 at dimension 1" "has" [4] "1" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dim_compare(dim7, dim1) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dim_compare(dim7, dim4) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dim_compare(dim1, dim7) $success [1] 0 $message $message$message [1] "have" "2 rows" "has" "0" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dim_compare(dim7, dim2) $success [1] 0 $message $message$message [1] "be" "\"matrix\"" "is" "\"array\"" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 1 7/14 internal.R: vetr:::dim_compare(dim8, dim2) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dim_compare(dim8, dim6) $success [1] 0 $message $message$message [1] "have" "size 2 at dimension 3" "has" [4] "3" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dim_compare(dim6, dim9) $success [1] 0 $message $message$message [1] "be" "\"array\"" "is" "\"integer\"" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 1 7/14 internal.R: vetr:::dim_compare(9L, NULL) $success [1] 0 $message $message$message [1] "have" "a \"dim\" attribute" "" [4] "" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dim_compare(dim1, dim2, list()) $success [1] 0 $message $message$message [1] "be" "\"list\"" "is" "\"integer\"" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 1 7/14 internal.R: vetr:::dim_compare(dim1, dim2, cur_obj = list()) $success [1] 0 $message $message$message [1] "be" "\"integer\"" "is" "\"list\"" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 1 7/14 internal.R: vetr:::dim_compare(dim1, dim2, list(), list()) $success [1] 0 $message $message$message [1] "have" "2 dimensions" "has" "3" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::dim_compare(dim1, dim2, integer(), list()) $success [1] 0 $message $message$message [1] "be" "\"integer\"" "is" "\"list\"" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 1 7/14 internal.R: vetr:::dim_compare(dim9, dim6) $success [1] 0 $message $message$message [1] "be" "\"integer\"" "is" "\"array\"" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 1 7/14 internal.R: vetr:::dim_compare(dim10, dim1) $success [1] 0 $message $message$message [1] "be" [2] "`alike` the corresponding element in target" [3] "" [4] "" $message$wrap $message$wrap[[1]] dim(NULL) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: unitizer_sect("Time Series", { 7/14 internal.R: ts.1 <- attr(ts(runif(24), 1970, frequency = 12), "tsp") 7/14 internal.R: ts.2 <- attr(ts(runif(24), 1970, frequency = 4), "tsp") 7/14 internal.R: ts.3 <- ts.4 <- ts.1 7/14 internal.R: ts.3[[2L]] <- 0 7/14 internal.R: ts.4[[3L]] <- 0 7/14 internal.R: vetr:::ts_compare(ts.1, ts.2) $success [1] 0 $message $message$message [1] "be" "1971.92" "is" "1975.75" $message$wrap $message$wrap[[1]] tsp(NULL)[2] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::ts_compare(ts.3, ts.2) $success [1] 0 $message $message$message [1] "be" "12" "is" "4" $message$wrap $message$wrap[[1]] tsp(NULL)[3] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::ts_compare(ts.4, ts.2) $success [1] 0 $message $message$message [1] "be" "1971.92" "is" "1975.75" $message$wrap $message$wrap[[1]] tsp(NULL)[2] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::ts_compare(ts.4, ts.1) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::ts_compare(ts.1, ts.4) $success [1] 0 $message $message$message [1] "be" "12" "is" "0" $message$wrap $message$wrap[[1]] tsp(NULL)[3] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::ts_compare(ts.4, "hello") $success [1] 0 $message $message$message [1] "be" [2] "`alike` the corresponding element in target" [3] "" [4] "" $message$wrap $message$wrap[[1]] tsp(NULL) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::ts_compare("hello", 1:3) $success [1] 0 $message $message$message [1] "be" [2] "`alike` the corresponding element in target" [3] "" [4] "" $message$wrap $message$wrap[[1]] tsp(NULL) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::ts_compare(ts.1, 1:3) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::ts_compare(ts.4, 1:4) $success [1] 0 $message $message$message [1] "be" [2] "`alike` the corresponding element in target" [3] "" [4] "" $message$wrap $message$wrap[[1]] tsp(NULL) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: unitizer_sect("All Attributes, default", { 7/14 internal.R: vetr:::attr_compare(1, 1) $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(matrix(integer(), 3), matrix(integer(), 3, $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(matrix(integer(), 3), matrix(integer(), 3, Error in vetr:::attr_compare(matrix(integer(), 3), matrix(integer(), 3, : Argument `mode` must be a one length integer like vector Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 7/14 internal.R: vetr:::attr_compare(matrix(integer(), 3), matrix(integer(), 3, $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(matrix(integer(), 4), matrix(integer(), 3, $success [1] 0 $message $message$message [1] "have" "4 rows" "has" "3" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 2 7/14 internal.R: vetr:::attr_compare(matrix(integer(), ncol = 4), matrix(intege $success [1] 0 $message $message$message [1] "have" "4 columns" "has" "3" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 2 7/14 internal.R: vetr:::attr_compare(matrix(integer(), 3, 3, dimnames = list(NU $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(matrix(integer(), 3, 3, dimnames = list(NU $success [1] 0 $message $message$message [1] "be" "\"b\"" "is" "\"a\"" $message$wrap $message$wrap[[1]] colnames(NULL)[1] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 5 7/14 internal.R: vetr:::attr_compare(matrix(integer(), 3, 3, dimnames = list(le $success [1] 0 $message $message$message [1] "be" "\"a\"" "is" "\"A\"" $message$wrap $message$wrap[[1]] row.names(NULL)[1] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 5 7/14 internal.R: vetr:::attr_compare(matrix(integer(), 3, 3, dimnames = list(LE $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(matrix(integer(), 3, 3, dimnames = list(A $success [1] 0 $message $message$message [1] "be" "\"A\"" "is" "\"a\"" $message$wrap $message$wrap[[1]] names(dimnames(NULL))[1] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 5 7/14 internal.R: vetr:::attr_compare(structure(list(integer(), character())), $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(structure(list(integer(), character()), cl $success [1] 1 $message NULL $df [1] 1 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(structure(unname(data.frame(integer(), cha $success [1] 1 $message NULL $df [1] 1 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(structure(list(), welp = list()), structur $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(structure(list(), welp = list(NULL)), stru $success [1] 0 $message $message$message [1] "be" "1" "is" "2" $message$wrap $message$wrap[[1]] length(attr(NULL, "welp")) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $message$wrap[[2]][[2]] [1] "welp" $df [1] 0 $lvl [1] 6 7/14 internal.R: vetr:::attr_compare(structure(list(), welp = list(), belp = 1: $success [1] 0 $message $message$message [1] "have" "attribute \"belp\"" "" [4] "" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 7 7/14 internal.R: vetr:::attr_compare(structure(list(), class = letters[1:3]), $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(structure(list(), class = letters[1:3]), $success [1] 0 $message $message$message [1] "be" "\"a\"" "is" "\"b\"" $message$wrap $message$wrap[[1]] class(NULL)[2] $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(structure(list(), class = letters[2:4]), $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: unitizer_sect("All attributes, strict", { 7/14 internal.R: vetr:::attr_compare(matrix(integer(), 3), matrix(integer(), 3, $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(matrix(integer(), 3, 3), matrix(integer(), $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(matrix(integer(), 3, 3, dimnames = list(NU $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(matrix(integer(), 3, 3, dimnames = list(LE $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(matrix(integer(), 3, 3, dimnames = list(a $success [1] 0 $message $message$message [1] "be" [2] "`alike` the corresponding element in target" [3] "" [4] "" $message$wrap $message$wrap[[1]] dimnames(NULL) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 6 7/14 internal.R: vetr:::attr_compare(matrix(integer(), 3, 3, dimnames = list(A $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(structure(list(integer(), character())), $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(structure(list(integer(), character()), cl $success [1] 1 $message NULL $df [1] 0 $lvl [1] 0 7/14 internal.R: vetr:::attr_compare(structure(list(), class = letters[2:4]), $success [1] 0 $message $message$message [1] "be" "3" "is" "4" $message$wrap $message$wrap[[1]] length(class(NULL)) $message$wrap[[2]] $message$wrap[[2]][[1]] NULL $df [1] 0 $lvl [1] 6 7/14 internal.R: vetr:::attr_compare(structure(list(integer(), character())), $success [1] 0 $message $message$message [1] "not have" "attribute \"class\"" "" [4] "" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 6 7/14 internal.R: vetr:::attr_compare(structure(list(integer(), character()), cl $success [1] 0 $message $message$message [1] "not have" "attribute \"names\"" "" [4] "" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 7 7/14 internal.R: vetr:::attr_compare(structure(list(), welp = list(NULL, 1:3), $success [1] 0 $message $message$message [1] "have" "attribute \"belp\"" "" [4] "" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 7 7/14 internal.R: vetr:::attr_compare(structure(list(), welp = list(NULL, 1:3), $success [1] 0 $message $message$message [1] "have" "attribute \"belp\"" "" [4] "" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $df [1] 0 $lvl [1] 7 7/14 internal.R: unitizer_sect("Closures", { 7/14 internal.R: vetr:::fun_alike(print, print.data.frame) [1] TRUE 7/14 internal.R: vetr:::fun_alike(print.data.frame, print) [1] "have" [2] "argument `digits` after argument `...`" [3] "" [4] "" 7/14 internal.R: vetr:::fun_alike(summary, summary.lm) [1] TRUE 7/14 internal.R: vetr:::fun_alike(summary.lm, summary) [1] "have" [2] "argument `correlation` after argument `object`" [3] "" [4] "" 7/14 internal.R: fn0 <- function(x, y) NULL 7/14 internal.R: fn1 <- function(x, y, z) NULL 7/14 internal.R: fn2 <- function(y, x) NULL 7/14 internal.R: fn3 <- function(x = 1, y = 2) NULL 7/14 internal.R: fn4 <- function(x, ...) NULL 7/14 internal.R: fn5 <- function(x) NULL 7/14 internal.R: fn6 <- function(x, y, z, ...) NULL 7/14 internal.R: fn7 <- function(x, ..., y) NULL 7/14 internal.R: fn8 <- function(x, a, ..., g, y) NULL 7/14 internal.R: fn9 <- function(x, a, ..., g, y, w) NULL 7/14 internal.R: vetr:::fun_alike(fn0, fn1) [1] "not have" "argument `z` after argument `y`" [3] "" "" 7/14 internal.R: vetr:::fun_alike(fn1, fn0) [1] "have" "argument `z` after argument `y`" [3] "" "" 7/14 internal.R: vetr:::fun_alike(fn4, fn1) [1] "have" "a `...` argument" "" "" 7/14 internal.R: vetr:::fun_alike(fn0, fn2) [1] "have" "argument `x` as first argument" [3] "" "" 7/14 internal.R: vetr:::fun_alike(fn0, fn3) [1] TRUE 7/14 internal.R: vetr:::fun_alike(fn3, fn0) [1] "have" "argument `x` as first argument" [3] "" "" 7/14 internal.R: vetr:::fun_alike(fn4, fn5) [1] "have" "argument `...` after argument `x`" [3] "" "" 7/14 internal.R: vetr:::fun_alike(fn4, fn6) [1] TRUE 7/14 internal.R: vetr:::fun_alike(fn4, fn7) [1] TRUE 7/14 internal.R: vetr:::fun_alike(fn7, fn4) [1] "have" "argument `y` after argument `...`" [3] "" "" 7/14 internal.R: vetr:::fun_alike(fn7, fn8) [1] TRUE 7/14 internal.R: vetr:::fun_alike(fn7, fn9) [1] "not have" "argument `w` after argument `y`" [3] "" "" 7/14 internal.R: vetr:::fun_alike(`+`, `-`) [1] TRUE 7/14 internal.R: vetr:::fun_alike(substitute, function(expr, env) NULL) [1] TRUE 7/14 internal.R: vetr:::fun_alike(function(expr, env) NULL, substitute) [1] TRUE 7/14 internal.R: vetr:::fun_alike(substitute, on.exit) [1] "have" [2] "argument `env` after argument `expr`" [3] "" [4] "" 7/14 internal.R: vetr:::fun_alike(on.exit, substitute) [1] "have" "argument `expr` as first argument" [3] "" "" 7/14 internal.R: vetr:::fun_alike(`[`, substitute) Error in vetr:::fun_alike(`[`, substitute) : argument of type NILSXP is not a closure Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 7/14 internal.R: vetr:::fun_alike(`[`, `&&`) Error in vetr:::fun_alike(`[`, `&&`) : argument of type NILSXP is not a closure Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 7/14 internal.R: vetr:::fun_alike(identity, 10) Error in vetr:::fun_alike(identity, 10) : Arguments must be functions. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 7/14 internal.R: vetr:::fun_alike(10, identity) Error in vetr:::fun_alike(10, identity) : Arguments must be functions. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 7/14 internal.R: unitizer_sect("Env Track", { 7/14 internal.R: el.1 <- replicate(5, new.env()) 7/14 internal.R: el.2 <- el.1[c(1, 1, 2, 3, 4, 1, 2, 3, 5, 1)] 7/14 internal.R: vetr:::env_track(el.1, 1L) [1] 1 3 3 1 3 7/14 internal.R: vetr:::env_track(el.2, 1L) [1] 1 0 1 3 1 0 0 0 1 0 7/14 internal.R: vetr:::env_track(el.1, 1L, 3L) [1] 1 3 -1 -1 -1 7/14 internal.R: vetr:::env_track(list(1, 2, 3), 1L, 3L) Error in vetr:::env_track(list(1, 2, 3), 1L, 3L) : All contents of `env` should be environments; error at item 1 Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 7/14 internal.R: unitizer_sect("valid names", { 7/14 internal.R: vetr:::is_valid_name("hello") [1] TRUE 7/14 internal.R: vetr:::is_valid_name(".hello") [1] TRUE 7/14 internal.R: vetr:::is_valid_name("123") [1] FALSE 7/14 internal.R: vetr:::is_valid_name("hello there") [1] FALSE 7/14 internal.R: vetr:::is_valid_name("h1ello") [1] TRUE 7/14 internal.R: vetr:::is_valid_name("_hello") [1] FALSE 7/14 internal.R: vetr:::is_valid_name(".1fail") [1] FALSE 7/14 internal.R: vetr:::is_valid_name("NULL") [1] FALSE 7/14 internal.R: vetr:::is_valid_name("FALSE") [1] FALSE 7/14 internal.R: vetr:::is_valid_name(letters) Error in vetr:::is_valid_name(letters) : Argument `name` must be character(1L) Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 7/14 internal.R: unitizer_sect("Is dfish", { 7/14 internal.R: df1 <- list(a = 1:10, b = letters[1:10]) 7/14 internal.R: df2 <- list(a = 1:10, b = letters[1:9]) 7/14 internal.R: vetr:::is_dfish(df1) [1] TRUE 7/14 internal.R: vetr:::is_dfish(df2) [1] FALSE 7/14 internal.R: vetr:::is_dfish(1:10) [1] FALSE 7/14 internal.R: unitizer_sect("syntactic", { 7/14 internal.R: vetr:::syntactic_names(quote(hello)) [1] TRUE 7/14 internal.R: vetr:::syntactic_names(quote(`hello there`)) [1] FALSE 7/14 internal.R: vetr:::syntactic_names(quote(1 + 1)) [1] TRUE 7/14 internal.R: vetr:::syntactic_names(quote(1 %hello there% 1)) [1] TRUE 7/14 internal.R: vetr:::syntactic_names(quote(1 + `hello there`)) [1] FALSE 7/14 internal.R: vetr:::syntactic_names(quote(-(1:3))) [1] TRUE 7/14 internal.R: vetr:::syntactic_names(quote(c(-1:1, NA_integer_))) [1] TRUE 7/14 internal.R: vetr:::syntactic_names(quote(a == 25)) [1] TRUE 7/14 internal.R: vetr:::syntactic_names(quote(all(-1:1 > 0))) [1] TRUE 7/14 internal.R: unitizer_sect("Pad or Quote", { 7/14 internal.R: vetr:::pad_or_quote(quote(1 + 1)) [1] "`1 + 1`" 7/14 internal.R: vetr:::pad_or_quote(quote(!anyNA(1 + 1))) [1] "`!anyNA(1 + 1)`" 7/14 internal.R: vetr:::pad_or_quote(quote(1 + 1), syntactic = 0L) [1] "{1 + 1}" 7/14 internal.R: vetr:::pad_or_quote(quote(1 + 1), syntactic = 1L) [1] "`1 + 1`" 7/14 internal.R: unitizer_sect("Merge messages", { 7/14 internal.R: vetr:::msg_sort(list(letters[5:1], letters[1:5])) [[1]] [1] "a" "b" "c" "d" "e" [[2]] [1] "e" "d" "c" "b" "a" 7/14 internal.R: vetr:::msg_sort(list(c("a", "a", "a", "z", "b"), c("a", "a", [[1]] [1] "a" "a" "z" "b" "b" [[2]] [1] "a" "a" "a" "z" "b" 7/14 internal.R: vetr:::msg_sort(list(letters[5:1])) [[1]] [1] "e" "d" "c" "b" "a" 7/14 internal.R: vetr:::msg_sort(as.list(letters[5:1])) [[1]] [1] "a" [[2]] [1] "b" [[3]] [1] "c" [[4]] [1] "d" [[5]] [1] "e" 7/14 internal.R: vetr:::msg_sort(list(letters[1:5], NULL)) Error in vetr:::msg_sort(list(letters[1:5], NULL)) : Internal Error: unexpected string format to merge; contact maintainer Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 7/14 internal.R: vetr:::msg_sort(letters) Error in vetr:::msg_sort(letters) : Expected list argument, got character Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 7/14 internal.R: msgs <- list(c("`my_var`", "be", "integer", "is", "character") 7/14 internal.R: vetr:::msg_merge(msgs) [[1]] [1] "`attr(my_var)`" "be" "\"NULL\"" "is" [5] "list" [[2]] [1] "`length(names(my_var))`" "be" [3] "2, or 3" "is" [5] "4" [[3]] [1] "`my_var`" "be" [3] "\"NULL\", integer, or matrix" "is" [5] "character" [[4]] [1] "`my_var`" "have" "3 columns" "has" "1" 7/14 internal.R: vetr:::msg_merge(msgs[1:3]) [[1]] [1] "`length(names(my_var))`" "be" [3] "2" "is" [5] "4" [[2]] [1] "`my_var`" "be" "integer" "is" "character" [[3]] [1] "`my_var`" "have" "3 columns" "has" "1" 7/14 internal.R: vetr:::msg_merge(msgs[1]) [[1]] [1] "`my_var`" "be" "integer" "is" "character" 7/14 internal.R: vetr:::msg_merge_2(msgs) [[1]] [1] "`attr(my_var)` should be \"NULL\" (is list)" [[2]] [1] "`length(names(my_var))` should be 2, or 3 (is 4)" [[3]] [1] "`my_var` should be \"NULL\", integer, or matrix (is character)" [[4]] [1] "`my_var` should have 3 columns (has 1)" 7/14 internal.R: unitizer_sect("Hash", { 7/14 internal.R: keys <- vapply(1:26, function(x) paste0(letters[seq(x)], colla 7/14 internal.R: values <- vapply(1:26, function(x) paste0(LETTERS[seq(x)], col 7/14 internal.R: vetr:::hash_test(keys, values) [1] "A" "AB" [3] "ABC" "ABCD" [5] "ABCDE" "ABCDEF" [7] "ABCDEFG" "ABCDEFGH" [9] "ABCDEFGHI" "ABCDEFGHIJ" [11] "ABCDEFGHIJK" "ABCDEFGHIJKL" [13] "ABCDEFGHIJKLM" "ABCDEFGHIJKLMN" [15] "ABCDEFGHIJKLMNO" "ABCDEFGHIJKLMNOP" [17] "ABCDEFGHIJKLMNOPQ" "ABCDEFGHIJKLMNOPQR" [19] "ABCDEFGHIJKLMNOPQRS" "ABCDEFGHIJKLMNOPQRST" [21] "ABCDEFGHIJKLMNOPQRSTU" "ABCDEFGHIJKLMNOPQRSTUV" [23] "ABCDEFGHIJKLMNOPQRSTUVW" "ABCDEFGHIJKLMNOPQRSTUVWX" [25] "ABCDEFGHIJKLMNOPQRSTUVWXY" "ABCDEFGHIJKLMNOPQRSTUVWXYZ" 7/14 internal.R: vetr:::track_hash(letters[1:3], 2L) [1] 1 1 4 7/14 internal.R: vetr:::track_hash(letters[1:5], 2L) [1] 1 1 4 1 8 7/14 internal.R: vetr:::track_hash(c("a", "b", "b"), 2L) [1] 1 1 0 7/14 internal.R: vetr:::track_hash(c("a", "b", NA, 1, "b"), 2L) [1] 1 1 NA 1 1 7/14 internal.R: vetr:::track_hash(c("a", "b", NA, 1, "a"), 2L) [1] 1 1 NA 1 0 7/14 internal.R: keys <- c("a", "b", NA, 1, "b", "hello", "goodbye", "a", NA, 7/14 internal.R: vetr:::track_hash(keys, 8L) [1] 1 1 NA 1 1 1 1 0 NA 3 0 1 0 7/14 internal.R: collisions <- c("f b", "n b", "n d", "t m", "b r", "n w", "q w 7/14 internal.R: keys.1 <- c(collisions, NA, 0, collisions) 7/14 internal.R: vetr:::track_hash(keys.1, 64L) [1] 1 1 1 1 1 1 1 1 NA 0 1 1 1 1 1 1 1 1 7/14 internal.R: keys.2 <- c(collisions, NA, 4, collisions) 7/14 internal.R: vetr:::track_hash(keys.2, 64L) [1] 1 1 1 1 1 1 1 1 NA 4 0 0 0 0 1 1 1 1 7/14 internal.R: vetr:::hash_test2(c(collisions[1:3], collisions[1:3], "hello") [1] 0 0 0 0 0 0 -1 7/14 internal.R: unitizer_sect("Mode", { 7/14 internal.R: vetr:::alike_mode(NULL) [1] "NULL" 7/14 internal.R: vetr:::alike_mode(quote(a)) [1] "name" 7/14 internal.R: vetr:::alike_mode(mean) [1] "function" 7/14 internal.R: vetr:::alike_mode(`+`) [1] "function" 7/14 internal.R: vetr:::alike_mode(log) [1] "function" 7/14 internal.R: vetr:::alike_mode(quote(1 + 1)) [1] "call" 7/14 internal.R: unitizer_sect("Find funs", { 7/14 internal.R: fun <- function(x, y) NULL 7/14 internal.R: vetr:::find_fun(quote(fun), environment()) function(x, y) NULL <environment: 0x55fdae0> 7/14 internal.R: vetr:::find_fun(quote(asdhfqwerasdfasdf), environment()) NULL 7/14 internal.R: fun2 <- function(x) vetr:::find_fun(quote(x), environment()) 7/14 internal.R: (fun2()) NULL 8/14 language.R: 8/14 language.R: library(vetr) 8/14 language.R: unitizer_sect("Match Calls", { 8/14 language.R: vetr:::match_call_alike(quote(var(y = 1:10, runif(10))), basee var(y = 1:10, runif(10)) 8/14 language.R: env0 <- new.env() 8/14 language.R: env0$var <- function(yollo, zambia) NULL 8/14 language.R: vetr:::match_call_alike(quote(var(y = 1:10, runif(10))), env0) var(yollo = 1:10, zambia = runif(10)) 8/14 language.R: unitizer_sect("Calls", { 8/14 language.R: c0 <- quote(fun(a, b, a, 25)) 8/14 language.R: c1 <- quote(fun(x, y, x, "hello")) 8/14 language.R: c2 <- quote(fun(x, y, z, "hello")) 8/14 language.R: c3 <- quote(FUN(x, y, x, 1.01)) 8/14 language.R: c4 <- quote(fun(x, y, x, z)) 8/14 language.R: c5 <- quote(fun(a + b + a, FUN(z, a + 1))) 8/14 language.R: c6 <- quote(fun(x + y + x, FUN(w, x + 2))) 8/14 language.R: c7 <- quote(fun(x + y + x, FUN(w, y + 2))) 8/14 language.R: c8 <- quote(fun(x + y + x, FUN(w, x - 2))) 8/14 language.R: c9 <- quote(fun(x + y + x, FUN(w, x + "hello"))) 8/14 language.R: c10 <- quote(fun(1)) 8/14 language.R: c11 <- quote(fun(1, 2)) 8/14 language.R: c12 <- quote(a + b + c) 8/14 language.R: c13 <- quote((a + b) + c) 8/14 language.R: c14 <- quote(a + (b + c)) 8/14 language.R: vetr:::lang_alike(c0, c1, NULL) $success [1] TRUE $message NULL $call.match NULL $call.ind NULL $call.ind.sub.par NULL $call.orig NULL 8/14 language.R: vetr:::lang_alike(c0, c2, NULL) $success [1] FALSE $message $message$message [1] "be" "`x`" "is" "`z`" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match fun(x, y, z, "hello") $call.ind NULL[[4]] $call.ind.sub.par $call.ind.sub.par[[1]] NULL $call.ind.sub.par[[2]] [1] 4 $call.orig fun(x, y, z, "hello") 8/14 language.R: vetr:::lang_alike(c0, c3, NULL) $success [1] FALSE $message $message$message [1] "be" "a call to `fun`" "is" "a call to `FUN`" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match FUN(x, y, x, 1.01) $call.ind NULL[[1]] $call.ind.sub.par $call.ind.sub.par[[1]] NULL $call.ind.sub.par[[2]] [1] 1 $call.orig FUN(x, y, x, 1.01) 8/14 language.R: vetr:::lang_alike(c0, c4, NULL) $success [1] FALSE $message $message$message [1] "be" "\"double\"" "is" "\"symbol\"" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match fun(x, y, x, z) $call.ind NULL[[5]] $call.ind.sub.par $call.ind.sub.par[[1]] NULL $call.ind.sub.par[[2]] [1] 5 $call.orig fun(x, y, x, z) 8/14 language.R: vetr:::lang_alike(c5, c6, NULL) $success [1] TRUE $message NULL $call.match NULL $call.ind NULL $call.ind.sub.par NULL $call.orig NULL 8/14 language.R: vetr:::lang_alike(c5, c7, NULL) $success [1] FALSE $message $message$message [1] "be" "`x`" "is" "`y`" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match fun(x + y + x, FUN(w, y + 2)) $call.ind NULL[[3]][[3]][[2]] $call.ind.sub.par $call.ind.sub.par[[1]] NULL $call.ind.sub.par[[2]] [1] 3 $call.orig fun(x + y + x, FUN(w, y + 2)) 8/14 language.R: vetr:::lang_alike(c5, c8, NULL) $success [1] FALSE $message $message$message [1] "be" "a call to `+`" "is" "a call to `-`" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match fun(x + y + x, FUN(w, x - 2)) $call.ind NULL[[3]][[3]][[1]] $call.ind.sub.par $call.ind.sub.par[[1]] NULL $call.ind.sub.par[[2]] [1] 3 $call.orig fun(x + y + x, FUN(w, x - 2)) 8/14 language.R: vetr:::lang_alike(c5, c9, NULL) $success [1] TRUE $message NULL $call.match NULL $call.ind NULL $call.ind.sub.par NULL $call.orig NULL 8/14 language.R: vetr:::lang_alike(c11, c10, NULL) $success [1] FALSE $message $message$message [1] "have" "2 arguments" "has" "1" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match fun(1) $call.ind NULL $call.ind.sub.par NULL $call.orig fun(1) 8/14 language.R: vetr:::lang_alike(c12, c13) $success [1] TRUE $message NULL $call.match NULL $call.ind NULL $call.ind.sub.par NULL $call.orig NULL 8/14 language.R: vetr:::lang_alike(c12, c14) $success [1] FALSE $message $message$message [1] "be" "a call to `+`" "is" "\"symbol\"" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match a + (b + c) $call.ind NULL[[2]] $call.ind.sub.par $call.ind.sub.par[[1]] NULL $call.ind.sub.par[[2]] [1] 2 $call.orig a + (b + c) 8/14 language.R: vetr:::lang_alike(c13, c14) $success [1] FALSE $message $message$message [1] "be" "a call to `+`" "is" "\"symbol\"" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match a + (b + c) $call.ind NULL[[2]] $call.ind.sub.par $call.ind.sub.par[[1]] NULL $call.ind.sub.par[[2]] [1] 2 $call.orig a + (b + c) 8/14 language.R: vetr:::lang_alike(c14, c13) $success [1] FALSE $message $message$message [1] "be" "\"symbol\"" "is" "\"language\"" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match (a + b) + c $call.ind NULL[[2]][[2]] $call.ind.sub.par $call.ind.sub.par[[1]] NULL $call.ind.sub.par[[2]] [1] 2 $call.orig (a + b) + c 8/14 language.R: fun <- function(abc, bcd, efg) NULL 8/14 language.R: ca <- quote(fun(a, b, a)) 8/14 language.R: cb <- quote(fun(x, e = x, y)) 8/14 language.R: vetr:::lang_alike(ca, cb, NULL) $success [1] FALSE $message $message$message [1] "not be" "`x`" "" "" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match fun(x, e = x, y) $call.ind NULL$e $call.ind.sub.par $call.ind.sub.par[[1]] NULL $call.ind.sub.par[[2]] e $call.orig fun(x, e = x, y) 8/14 language.R: vetr:::lang_alike(cb, ca, NULL) $success [1] FALSE $message $message$message [1] "have" "argument `e` after argument 1" [3] "has" "unnamed argument" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match fun(a, b, a) $call.ind NULL $call.ind.sub.par NULL $call.orig fun(a, b, a) 8/14 language.R: vetr:::lang_alike(ca, cb) $success [1] TRUE $message NULL $call.match NULL $call.ind NULL $call.ind.sub.par NULL $call.orig NULL 8/14 language.R: ca.1 <- ca 8/14 language.R: cb.1 <- cb 8/14 language.R: ca.1[[1]] <- fun 8/14 language.R: cb.1[[1]] <- fun 8/14 language.R: vetr:::lang_alike(ca.1, cb.1) $success [1] TRUE $message NULL $call.match NULL $call.ind NULL $call.ind.sub.par NULL $call.orig NULL 8/14 language.R: cc <- quote(fun(a, b, fun(b = 1))) 8/14 language.R: cd <- quote(fun(a, b, fun(c = 1))) 8/14 language.R: vetr:::lang_alike(cc, cd) $success [1] FALSE $message $message$message [1] "have" "argument `bcd` as first argument" [3] "has" "`c`" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match fun(abc = a, bcd = b, efg = fun(c = 1)) $call.ind NULL[[4]] $call.ind.sub.par $call.ind.sub.par[[1]] NULL $call.ind.sub.par[[2]] [1] 4 $call.orig fun(a, b, fun(c = 1)) 8/14 language.R: ce <- quote(fun(a, b, NULL)) 8/14 language.R: vetr:::lang_alike(cc, ce) $success [1] FALSE $message $message$message [1] "be" "a call to `fun`" "is" "\"NULL\"" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match fun(abc = a, bcd = b, efg = NULL) $call.ind NULL[[4]] $call.ind.sub.par $call.ind.sub.par[[1]] NULL $call.ind.sub.par[[2]] [1] 4 $call.orig fun(a, b, NULL) 8/14 language.R: vetr:::lang_alike(ce, cc) $success [1] TRUE $message NULL $call.match NULL $call.ind NULL $call.ind.sub.par NULL $call.orig NULL 8/14 language.R: da <- quote(ff(a = 1, b = 2, c = 3)) 8/14 language.R: db <- quote(ff(a = 1, d = 2, c = 3)) 8/14 language.R: vetr:::lang_alike(da, db) $success [1] FALSE $message $message$message [1] "have" "argument `b` after argument `a`" [3] "has" "`d`" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match ff(a = 1, d = 2, c = 3) $call.ind NULL $call.ind.sub.par NULL $call.orig ff(a = 1, d = 2, c = 3) 8/14 language.R: vetr:::lang_alike(cc, 1:10) Error in vetr:::lang_alike(cc, 1:10) : Arguments must be LANGSXP, SYMSXP, or R_NilValue Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 8/14 language.R: vetr:::lang_alike(ce, cc, match.call.env = 1:10) Error in vetr:::lang_alike(ce, cc, match.call.env = 1:10) : Argument `match.call.env` must be an environment or NULL Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 8/14 language.R: unitizer_sect("Calls as char", { 8/14 language.R: vetr:::lang_alike_chr(c0, c1, NULL) [1] "" 8/14 language.R: vetr:::lang_alike_chr(c0, c2, NULL) [1] "be" "`x`" "is" "`z`" 8/14 language.R: vetr:::lang_alike_chr(c0, c3, NULL) [1] "be" "a call to `fun`" "is" "a call to `FUN`" 8/14 language.R: vetr:::lang_alike_chr(c0, c4, NULL) [1] "be" "\"double\"" "is" "\"symbol\"" 8/14 language.R: vetr:::lang_alike_chr(c5, c6, NULL) [1] "" 8/14 language.R: vetr:::lang_alike_chr(c5, c7, NULL) [1] "be" "`x`" "is" "`y`" 8/14 language.R: vetr:::lang_alike_chr(c5, c8, NULL) [1] "be" "a call to `+`" "is" "a call to `-`" 8/14 language.R: vetr:::lang_alike_chr(c5, c9, NULL) [1] "" 8/14 language.R: vetr:::lang_alike_chr(ca, cb, NULL) [1] "not be" "`x`" "" "" 8/14 language.R: vetr:::lang_alike_chr(cb, ca, NULL) [1] "have" "argument `e` after argument 1" [3] "has" "unnamed argument" 8/14 language.R: vetr:::lang_alike_chr(ca, cb) [1] "" 8/14 language.R: vetr:::lang_alike_chr(cc, cd) [1] "have" "argument `bcd` as first argument" [3] "has" "`c`" 8/14 language.R: vetr:::lang_alike_chr(cc, ce) [1] "be" "a call to `fun`" "is" "\"NULL\"" 8/14 language.R: vetr:::lang_alike_chr(ce, cc) [1] "" 8/14 language.R: unitizer_sect("Formulas", { 8/14 language.R: f0 <- y ~ x + 1 8/14 language.R: f1 <- a ~ b + 1 8/14 language.R: f2 <- a ~ b + 2 8/14 language.R: f3 <- y ~ x + log(x) + z - 1 8/14 language.R: f4 <- a ~ b + log(b) + c - 1 8/14 language.R: f5 <- a ~ b + log(c) + b - 1 8/14 language.R: f6 <- a ~ b + ln(b) + c - 1 8/14 language.R: f7 <- a ~ b + log(b) + c + 1 8/14 language.R: vetr:::lang_alike(f0, f1, NULL) $success [1] TRUE $message NULL $call.match NULL $call.ind NULL $call.ind.sub.par NULL $call.orig NULL 8/14 language.R: vetr:::lang_alike(f0, f2, NULL) $success [1] FALSE $message $message$message [1] "have" "identical constant values" [3] "" "" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match a ~ b + 2 <environment: 0x8838bb0> $call.ind NULL[[3]][[3]] $call.ind.sub.par $call.ind.sub.par[[1]] NULL $call.ind.sub.par[[2]] [1] 3 $call.orig a ~ b + 2 <environment: 0x8838bb0> 8/14 language.R: vetr:::lang_alike(f3, f4, NULL) $success [1] TRUE $message NULL $call.match NULL $call.ind NULL $call.ind.sub.par NULL $call.orig NULL 8/14 language.R: vetr:::lang_alike(f3, f5, NULL) $success [1] FALSE $message $message$message [1] "be" "`b`" "is" "`c`" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match a ~ b + log(c) + b - 1 <environment: 0x8838bb0> $call.ind NULL[[3]][[2]][[2]][[3]][[2]] $call.ind.sub.par $call.ind.sub.par[[1]] NULL $call.ind.sub.par[[2]] [1] 3 $call.orig a ~ b + log(c) + b - 1 <environment: 0x8838bb0> 8/14 language.R: vetr:::lang_alike(f3, f6, NULL) $success [1] FALSE $message $message$message [1] "be" "a call to `log`" "is" "a call to `ln`" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match a ~ b + ln(b) + c - 1 <environment: 0x8838bb0> $call.ind NULL[[3]][[2]][[2]][[3]][[1]] $call.ind.sub.par $call.ind.sub.par[[1]] NULL $call.ind.sub.par[[2]] [1] 3 $call.orig a ~ b + ln(b) + c - 1 <environment: 0x8838bb0> 8/14 language.R: vetr:::lang_alike(f3, f7, NULL) $success [1] FALSE $message $message$message [1] "be" "a call to `-`" "is" "a call to `+`" $message$wrap $message$wrap[[1]] NULL $message$wrap[[2]] NULL $call.match a ~ b + log(b) + c + 1 <environment: 0x8838bb0> $call.ind NULL[[3]][[1]] $call.ind.sub.par $call.ind.sub.par[[1]] NULL $call.ind.sub.par[[2]] [1] 3 $call.orig a ~ b + log(b) + c + 1 <environment: 0x8838bb0> 8/14 language.R: unitizer_sect("Deparse", { 8/14 language.R: l0 <- quote(a + b + fun(x + funz(matrix_over[25, 32]) + transf 8/14 language.R: (dep.txt <- vetr:::dep_alike(l0)) [1] "a + b + fun(x + funz(matrix_over[25, 32]) + transform(iris, x = Sepal.Width * " [2] " 3)/the_donkey_ate_a_carrot %in% {" [3] " paste0(match(letter, LETTERS), c(\"hello there\"))" [4] "})" 8/14 language.R: vetr:::dep_alike(l0, 30) [1] "a + b + fun(x + funz(matrix_over[25, " [2] " 32]) + transform(iris, x = Sepal.Width * " [3] " 3)/the_donkey_ate_a_carrot %in% " [4] " {" [5] " paste0(match(letter, LETTERS), " [6] " c(\"hello there\"))" [7] " })" 8/14 language.R: vetr:::pad(dep.txt) [1] "> a + b + fun(x + funz(matrix_over[25, 32]) + transform(iris, x = Sepal.Width * \n+ 3)/the_donkey_ate_a_carrot %in% {\n+ paste0(match(letter, LETTERS), c(\"hello there\"))\n+ })\n" 8/14 language.R: old.opt <- options(prompt = ">>", continue = " |") 8/14 language.R: vetr:::pad(dep.txt) [1] ">>a + b + fun(x + funz(matrix_over[25, 32]) + transform(iris, x = Sepal.Width * \n | 3)/the_donkey_ate_a_carrot %in% {\n | paste0(match(letter, LETTERS), c(\"hello there\"))\n |})\n" 8/14 language.R: options(old.opt) 8/14 language.R: vetr:::pad(dep.txt, pad = 4) [1] " a + b + fun(x + funz(matrix_over[25, 32]) + transform(iris, x = Sepal.Width * \n 3)/the_donkey_ate_a_carrot %in% {\n paste0(match(letter, LETTERS), c(\"hello there\"))\n })\n" 8/14 language.R: vetr:::pad(dep.txt, pad = 4, lines = 2) [1] " a + b + fun(x + funz(matrix_over[25, 32]) + transform(iris, x = Sepal.Width * \n 3)/the_donkey_ate_a_carrot %in% {...\n" 8/14 language.R: vetr:::dep_oneline(quote(1 + 1 + 3 + 944254235), 10) [1] "1 + 1 + .." 8/14 language.R: vetr:::dep_oneline(quote(1 + 1 + 3), 10) [1] "1 + 1 + 3" 8/14 language.R: vetr:::dep_oneline(quote(1 + 1 + 3), "hello") Warning in vetr:::dep_oneline(quote(1 + 1 + 3), "hello") : NAs introduced by coercion Error in vetr:::dep_oneline(quote(1 + 1 + 3), "hello") : Internal Error: arg max_chars and keep_at_end must be positive Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> <Anonymous> 8/14 language.R: vetr:::dep_oneline(quote(1 + 1 + 3 - (mean(1:10) + 3)), 15, 1L [1] "1 + 1 + 3 - ..)" 9/14 misc.R: 9/14 misc.R: library(vetr) 9/14 misc.R: unitizer_sect("All", { 9/14 misc.R: vetr:::val_all(1:10) [1] -2 9/14 misc.R: vetr:::val_all(rep(TRUE, 10)) [1] 1 9/14 misc.R: vetr:::val_all(c(rep(TRUE, 10), FALSE, TRUE)) [1] 0 9/14 misc.R: vetr:::val_all(c(rep(TRUE, 5), NA, rep(TRUE, 5))) [1] -4 9/14 misc.R: vetr:::val_all(FALSE) [1] -1 9/14 misc.R: vetr:::val_all(TRUE) [1] 2 9/14 misc.R: vetr:::val_all(logical()) [1] 3 9/14 misc.R: vetr:::val_all(NA) [1] -3 9/14 misc.R: vetr:::val_all(c(TRUE, TRUE, NA, TRUE)) [1] -4 9/14 misc.R: unitizer_sect("Hash", { 9/14 misc.R: vetr:::hash_fun(c("f b", "n b", "n d", "t m", "b r", "n w", "q w", [1] 193 193 193 193 193 193 193 193 9/14 misc.R: unitizer_sect("bench_mark", { 9/14 misc.R: capt_wo_time <- function(x) { 9/14 misc.R: capt_wo_time(bench_mark(Sys.sleep(1.2), times = 1)) [1] "Mean eval time from 1 iteration, in seconds:" [2] " Sys.sleep(1.2) ~" 9/14 misc.R: capt_wo_time(bench_mark(Sys.sleep(0.01), times = 10)) [1] "Mean eval time from 10 iterations, in milliseconds:" [2] " Sys.sleep(0.01) ~" 9/14 misc.R: capt_wo_time(bench_mark(1 + 1, NULL, times = 100)) [1] "Mean eval time from 100 iterations, in microseconds:" [2] " 1 + 1 ~" [3] " NULL ~" 9/14 misc.R: unitizer_sect("sort pair lists", { 9/14 misc.R: vetr:::list_as_sorted_vec(pairlist(c = 1, a = list(), b = NULL)) $a list() $b NULL $c [1] 1 9/14 misc.R: vetr:::list_as_sorted_vec(pairlist(b = 1, 2, a = 3)) [[1]] [1] 2 $a [1] 3 $b [1] 1 9/14 misc.R: vetr:::list_as_sorted_vec(pairlist()) list() 9/14 misc.R: vetr:::list_as_sorted_vec(pairlist(a = 1)) $a [1] 1 10/14 parse.R: 10/14 parse.R: library(vetr) 10/14 parse.R: unitizer_sect("name_sub", { 10/14 parse.R: vetr:::name_sub(quote(.), quote(xyz)) xyz 10/14 parse.R: vetr:::name_sub(quote(.), quote(x + yz)) x + yz 10/14 parse.R: vetr:::name_sub(quote(.), c(1:3)) [1] 1 2 3 10/14 parse.R: vetr:::name_sub(quote(..), quote(xyz)) . 10/14 parse.R: vetr:::name_sub(quote(...), quote(xyz)) .. 10/14 parse.R: vetr:::name_sub(quote(.zzz), quote(xyz)) .zzz 10/14 parse.R: vetr:::name_sub(quote(zzz.), quote(xyz)) zzz. 10/14 parse.R: vetr:::name_sub(quote(zzz), quote(xyz)) zzz 10/14 parse.R: vetr:::name_sub(quote(a + b), quote(xyz)) a + b 10/14 parse.R: vetr:::name_sub(quote(. + .), quote(xyz)) . + . 10/14 parse.R: vetr:::name_sub(quote(.(zzz)), quote(xyz)) .(zzz) 10/14 parse.R: vetr:::name_sub("hello", quote(xyz)) [1] "hello" 10/14 parse.R: unitizer_sect("remove parens", { 10/14 parse.R: vetr:::remove_parens(quote((a))) [[1]] a [[2]] [1] 0 10/14 parse.R: vetr:::remove_parens(quote(.(a))) [[1]] a [[2]] [1] 1 10/14 parse.R: vetr:::remove_parens(quote((((a))))) [[1]] a [[2]] [1] 0 10/14 parse.R: vetr:::remove_parens(quote((.((.(a)))))) [[1]] a [[2]] [1] 1 10/14 parse.R: vetr:::remove_parens(quote((a) && .(a))) [[1]] (a) && .(a) [[2]] [1] 0 10/14 parse.R: unitizer_sect("parse", { 10/14 parse.R: x <- quote(.(.) && ((a))) 10/14 parse.R: vetr:::parse_validator(x, quote(arg_to_validate)) [[1]] NULL && a [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [1] 10 [[2]][[3]] [1] 999 [[3]] arg_to_validate && a 10/14 parse.R: (x) .(.) && ((a)) 10/14 parse.R: vetr:::parse_validator(quote(FALSE), quote(arg_to_validate)) [[1]] [1] FALSE [[2]] [1] 999 [[3]] [1] FALSE 10/14 parse.R: vetr:::parse_validator(quote(((FALSE))), quote(arg_to_validate)) [[1]] [1] FALSE [[2]] [1] 999 [[3]] [1] FALSE 10/14 parse.R: vetr:::parse_validator(quote(((FALSE && ((TRUE))))), quote(arg_to [[1]] FALSE && TRUE [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [1] 999 [[2]][[3]] [1] 999 [[3]] FALSE && TRUE 10/14 parse.R: vetr:::parse_validator(quote(.(FALSE)), quote(arg_to_validate)) [[1]] [1] FALSE [[2]] [1] 10 [[3]] [1] FALSE 10/14 parse.R: vetr:::parse_validator(quote(.), quote(arg_to_validate)) [[1]] NULL [[2]] [1] 10 [[3]] arg_to_validate 10/14 parse.R: vetr:::parse_validator(quote(. && a), quote(arg_to_validate)) [[1]] NULL && a [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [1] 10 [[2]][[3]] [1] 999 [[3]] arg_to_validate && a 10/14 parse.R: vetr:::parse_validator(quote(.(.)), quote(arg_to_validate)) [[1]] NULL [[2]] [1] 10 [[3]] arg_to_validate 10/14 parse.R: vetr:::parse_validator(quote(((a && b) || .(.))), quote(arg_to_va [[1]] a && b || NULL [[2]] [[2]][[1]] [1] 2 [[2]][[2]] [[2]][[2]][[1]] [1] 1 [[2]][[2]][[2]] [1] 999 [[2]][[2]][[3]] [1] 999 [[2]][[3]] [1] 10 [[3]] a && b || arg_to_validate 10/14 parse.R: vetr:::parse_validator(quote(matrix(nrow = 3)), quote(arg_to_vali [[1]] matrix(nrow = 3) [[2]] [[2]][[1]] [1] 999 [[2]][[2]] [1] 999 [[3]] matrix(nrow = 3) 10/14 parse.R: vetr:::parse_validator(quote(matrix(nrow = 3) && .(.)), quote(arg [[1]] matrix(nrow = 3) && NULL [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [[2]][[2]][[1]] [1] 999 [[2]][[2]][[2]] [1] 999 [[2]][[3]] [1] 10 [[3]] matrix(nrow = 3) && arg_to_validate 10/14 parse.R: vetr:::parse_validator(quote((a || ((b && c))) && .(a + .)), [[1]] (a || b && c) && a + NULL [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [[2]][[2]][[1]] [1] 2 [[2]][[2]][[2]] [1] 999 [[2]][[2]][[3]] [[2]][[2]][[3]][[1]] [1] 1 [[2]][[2]][[3]][[2]] [1] 999 [[2]][[2]][[3]][[3]] [1] 999 [[2]][[3]] [[2]][[3]][[1]] [1] 10 [[2]][[3]][[2]] [1] 10 [[2]][[3]][[3]] [1] 10 [[3]] (a || b && c) && a + arg_to_validate 10/14 parse.R: vetr:::parse_validator(quote((a || ((b && .(c)))) && (a + .(.))), [[1]] (a || b && c) && a + NULL [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [[2]][[2]][[1]] [1] 2 [[2]][[2]][[2]] [1] 999 [[2]][[2]][[3]] [[2]][[2]][[3]][[1]] [1] 1 [[2]][[2]][[3]][[2]] [1] 999 [[2]][[2]][[3]][[3]] [1] 10 [[2]][[3]] [[2]][[3]][[1]] [1] 10 [[2]][[3]][[2]] [1] 999 [[2]][[3]][[3]] [1] 10 [[3]] (a || b && c) && a + arg_to_validate 10/14 parse.R: vetr:::parse_validator(quote(a && (b + .(c))), quote(arg_to_valid [[1]] a && b + c [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [1] 999 [[2]][[3]] [[2]][[3]][[1]] [1] 10 [[2]][[3]][[2]] [1] 999 [[2]][[3]][[3]] [1] 10 [[3]] a && b + c 10/14 parse.R: vetr:::parse_validator(quote(a && .), "hello") [[1]] a && NULL [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [1] 999 [[2]][[3]] [1] 10 [[3]] a && "hello" 10/14 parse.R: unitizer_sect("token sub", { 10/14 parse.R: vetr:::symb_sub(INT.1) integer(1L) && NO.NA && NO.INF 10/14 parse.R: vetr:::symb_sub(NO.NA) !is.na(.) attr(,"err.msg") [1] "%s should not contain NAs, but does" 10/14 parse.R: unitizer_sect("preset tokens", { 10/14 parse.R: x <- quote(integer(1L)) 10/14 parse.R: y <- quote(integer(1L) || NULL) 10/14 parse.R: z <- quote(integer(1L) && .(!any(is.na(.)))) 10/14 parse.R: vetr:::parse_validator(quote(x), quote(w)) [[1]] integer(1L) [[2]] [[2]][[1]] [1] 999 [[2]][[2]] [1] 999 [[3]] integer(1L) 10/14 parse.R: vetr:::parse_validator(quote(y), quote(w)) [[1]] integer(1L) || NULL [[2]] [[2]][[1]] [1] 2 [[2]][[2]] [[2]][[2]][[1]] [1] 999 [[2]][[2]][[2]] [1] 999 [[2]][[3]] [1] 999 [[3]] integer(1L) || NULL 10/14 parse.R: vetr:::parse_validator(quote(z), quote(w)) [[1]] integer(1L) && !any(is.na(NULL)) [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [[2]][[2]][[1]] [1] 999 [[2]][[2]][[2]] [1] 999 [[2]][[3]] [[2]][[3]][[1]] [1] 10 [[2]][[3]][[2]] [[2]][[3]][[2]][[1]] [1] 10 [[2]][[3]][[2]][[2]] [[2]][[3]][[2]][[2]][[1]] [1] 10 [[2]][[3]][[2]][[2]][[2]] [1] 10 [[3]] integer(1L) && !any(is.na(w)) 10/14 parse.R: vetr:::parse_validator(quote(z || NULL), quote(w)) [[1]] integer(1L) && !any(is.na(NULL)) || NULL [[2]] [[2]][[1]] [1] 2 [[2]][[2]] [[2]][[2]][[1]] [1] 1 [[2]][[2]][[2]] [[2]][[2]][[2]][[1]] [1] 999 [[2]][[2]][[2]][[2]] [1] 999 [[2]][[2]][[3]] [[2]][[2]][[3]][[1]] [1] 10 [[2]][[2]][[3]][[2]] [[2]][[2]][[3]][[2]][[1]] [1] 10 [[2]][[2]][[3]][[2]][[2]] [[2]][[2]][[3]][[2]][[2]][[1]] [1] 10 [[2]][[2]][[3]][[2]][[2]][[2]] [1] 10 [[2]][[3]] [1] 999 [[3]] integer(1L) && !any(is.na(w)) || NULL 10/14 parse.R: unitizer_sect("validators", { 10/14 parse.R: vetr:::parse_validator(INT.1, quote(w)) [[1]] integer(1L) && !is.na(NULL) && is.finite(NULL) [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [[2]][[2]][[1]] [1] 1 [[2]][[2]][[2]] [[2]][[2]][[2]][[1]] [1] 999 [[2]][[2]][[2]][[2]] [1] 999 [[2]][[2]][[3]] [[2]][[2]][[3]][[1]] [1] 10 [[2]][[2]][[3]][[2]] [[2]][[2]][[3]][[2]][[1]] [1] 999 [[2]][[2]][[3]][[2]][[2]] [1] 10 [[2]][[3]] [[2]][[3]][[1]] [1] 10 [[2]][[3]][[2]] [1] 10 [[3]] integer(1L) && !is.na(w) && is.finite(w) 10/14 parse.R: vetr:::parse_validator(INT, quote(w)) [[1]] integer() && !is.na(NULL) && is.finite(NULL) [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [[2]][[2]][[1]] [1] 1 [[2]][[2]][[2]] [[2]][[2]][[2]][[1]] [1] 999 [[2]][[2]][[3]] [[2]][[2]][[3]][[1]] [1] 10 [[2]][[2]][[3]][[2]] [[2]][[2]][[3]][[2]][[1]] [1] 999 [[2]][[2]][[3]][[2]][[2]] [1] 10 [[2]][[3]] [[2]][[3]][[1]] [1] 10 [[2]][[3]][[2]] [1] 10 [[3]] integer() && !is.na(w) && is.finite(w) 10/14 parse.R: vetr:::parse_validator(CHR.1, quote(w)) [[1]] character(1L) && !is.na(NULL) [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [[2]][[2]][[1]] [1] 999 [[2]][[2]][[2]] [1] 999 [[2]][[3]] [[2]][[3]][[1]] [1] 10 [[2]][[3]][[2]] [[2]][[3]][[2]][[1]] [1] 999 [[2]][[3]][[2]][[2]] [1] 10 [[3]] character(1L) && !is.na(w) 10/14 parse.R: vetr:::parse_validator(CHR, quote(w)) [[1]] character() && !is.na(NULL) [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [[2]][[2]][[1]] [1] 999 [[2]][[3]] [[2]][[3]][[1]] [1] 10 [[2]][[3]][[2]] [[2]][[3]][[2]][[1]] [1] 999 [[2]][[3]][[2]][[2]] [1] 10 [[3]] character() && !is.na(w) 10/14 parse.R: vetr:::parse_validator(NUM.1, quote(w)) [[1]] numeric(1L) && !is.na(NULL) && is.finite(NULL) [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [[2]][[2]][[1]] [1] 1 [[2]][[2]][[2]] [[2]][[2]][[2]][[1]] [1] 999 [[2]][[2]][[2]][[2]] [1] 999 [[2]][[2]][[3]] [[2]][[2]][[3]][[1]] [1] 10 [[2]][[2]][[3]][[2]] [[2]][[2]][[3]][[2]][[1]] [1] 999 [[2]][[2]][[3]][[2]][[2]] [1] 10 [[2]][[3]] [[2]][[3]][[1]] [1] 10 [[2]][[3]][[2]] [1] 10 [[3]] numeric(1L) && !is.na(w) && is.finite(w) 10/14 parse.R: vetr:::parse_validator(NUM, quote(w)) [[1]] numeric() && !is.na(NULL) && is.finite(NULL) [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [[2]][[2]][[1]] [1] 1 [[2]][[2]][[2]] [[2]][[2]][[2]][[1]] [1] 999 [[2]][[2]][[3]] [[2]][[2]][[3]][[1]] [1] 10 [[2]][[2]][[3]][[2]] [[2]][[2]][[3]][[2]][[1]] [1] 999 [[2]][[2]][[3]][[2]][[2]] [1] 10 [[2]][[3]] [[2]][[3]][[1]] [1] 10 [[2]][[3]][[2]] [1] 10 [[3]] numeric() && !is.na(w) && is.finite(w) 10/14 parse.R: vetr:::parse_validator(LGL.1, quote(w)) [[1]] logical(1L) && !is.na(NULL) [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [[2]][[2]][[1]] [1] 999 [[2]][[2]][[2]] [1] 999 [[2]][[3]] [[2]][[3]][[1]] [1] 10 [[2]][[3]][[2]] [[2]][[3]][[2]][[1]] [1] 999 [[2]][[3]][[2]][[2]] [1] 10 [[3]] logical(1L) && !is.na(w) 10/14 parse.R: vetr:::parse_validator(LGL, quote(w)) [[1]] logical() && !is.na(NULL) [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [[2]][[2]][[1]] [1] 999 [[2]][[3]] [[2]][[3]][[1]] [1] 10 [[2]][[3]][[2]] [[2]][[3]][[2]][[1]] [1] 999 [[2]][[3]][[2]][[2]] [1] 10 [[3]] logical() && !is.na(w) 10/14 parse.R: vetr:::parse_validator(CPX.1, quote(w)) [[1]] complex(1L) && !is.na(NULL) && is.finite(NULL) [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [[2]][[2]][[1]] [1] 1 [[2]][[2]][[2]] [[2]][[2]][[2]][[1]] [1] 999 [[2]][[2]][[2]][[2]] [1] 999 [[2]][[2]][[3]] [[2]][[2]][[3]][[1]] [1] 10 [[2]][[2]][[3]][[2]] [[2]][[2]][[3]][[2]][[1]] [1] 999 [[2]][[2]][[3]][[2]][[2]] [1] 10 [[2]][[3]] [[2]][[3]][[1]] [1] 10 [[2]][[3]][[2]] [1] 10 [[3]] complex(1L) && !is.na(w) && is.finite(w) 10/14 parse.R: vetr:::parse_validator(CPX, quote(w)) [[1]] complex() && !is.na(NULL) && is.finite(NULL) [[2]] [[2]][[1]] [1] 1 [[2]][[2]] [[2]][[2]][[1]] [1] 1 [[2]][[2]][[2]] [[2]][[2]][[2]][[1]] [1] 999 [[2]][[2]][[3]] [[2]][[2]][[3]][[1]] [1] 10 [[2]][[2]][[3]][[2]] [[2]][[2]][[3]][[2]][[1]] [1] 999 [[2]][[2]][[3]][[2]][[2]] [1] 10 [[2]][[3]] [[2]][[3]][[1]] [1] 10 [[2]][[3]][[2]] [1] 10 [[3]] complex() && !is.na(w) && is.finite(w) 11/14 tev.R: 11/14 tev.R: library(vetr) 11/14 tev.R: unitizer_sect("tev", { 11/14 tev.R: tev(runif(2), numeric(2)) [1] TRUE 11/14 tev.R: tev(runif(3), numeric(2)) [1] "`length(runif(3))` should be 2 (is 3)" 12/14 type.R: 12/14 type.R: library(vetr) 12/14 type.R: unitizer_sect("type_of", { 12/14 type.R: type_of(1:100) [1] "integer" 12/14 type.R: type_of(1.1) [1] "double" 12/14 type.R: type_of(1:100 + 1) [1] "integer" 12/14 type.R: type_of(1:100 + 1/1e+09) [1] "double" 12/14 type.R: type_of(NA_real_) [1] "double" 12/14 type.R: type_of(Inf) [1] "double" 12/14 type.R: type_of(-Inf) [1] "double" 12/14 type.R: unitizer_sect("type_alike", { 12/14 type.R: type_alike(1, 1.1) [1] TRUE 12/14 type.R: type_alike(1L, 1.1) [1] "`1.1` should be type \"integer-like\" (is \"double\")" 12/14 type.R: type_alike(1L, 1.00000001) [1] "`1.00000001` should be type \"integer-like\" (is \"double\")" 12/14 type.R: type_alike(1L, 1) [1] TRUE 12/14 type.R: type_alike(1, 1.1, vetr_settings(type.mode = 1)) [1] TRUE 12/14 type.R: type_alike(1L, 1, vetr_settings(type.mode = 1)) [1] "`1` should be type \"integer\" (is \"double\")" 12/14 type.R: type_alike(1, 1L, vetr_settings(type.mode = 1)) [1] TRUE 12/14 type.R: type_alike(1, 1L, vetr_settings(type.mode = 2)) [1] "`1L` should be type \"double\" (is \"integer\")" 12/14 type.R: type_alike(1:100, 1:100 + 0) [1] TRUE 12/14 type.R: type_alike(1:101, 1:101 + 0) [1] "`1:101 + 0` should be type \"integer\" (is \"double\")" 12/14 type.R: type_alike(1:101, 1:101 + 0, vetr_settings(fuzzy.int.max.len = 200 [1] TRUE 12/14 type.R: type_alike(numeric(), c(1.1, 0.053, 41.8)) [1] TRUE 12/14 type.R: type_alike(numeric(), list(1.1)) [1] "`list(1.1)` should be type \"numeric\" (is \"list\")" 12/14 type.R: type_alike(list(), integer()) [1] "`integer()` should be type \"list\" (is \"integer\")" 12/14 type.R: type_alike(1000000L, 1000000L + 0.1) [1] "`1000000L + 0.1` should be type \"integer-like\" (is \"double\")" 12/14 type.R: type_alike(1000000L, 1000000L + 0) [1] TRUE 12/14 type.R: type_alike(data.frame(a = 1:10), list()) [1] TRUE 12/14 type.R: type_alike(NULL, NULL) [1] TRUE 12/14 type.R: type_alike(1/0, NA) [1] "`NA` should be type \"numeric\" (is \"logical\")" 12/14 type.R: type_alike(1, 1.1, vetr_settings(type.mode = 1:2)) Error in type_alike(1, 1.1, vetr_settings(type.mode = 1:2)) : Setting `type.mode` must be scalar integer (is length 2). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> type_alike 12/14 type.R: type_alike(1, 1.1, vetr_settings(fuzzy.int.max.len = 1:2)) Error in type_alike(1, 1.1, vetr_settings(fuzzy.int.max.len = 1:2)) : Setting `fuzzy.int.max.len` must be scalar integer (is length 2). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> type_alike 12/14 type.R: unitizer_sect("functions", { 12/14 type.R: type_alike(sd, var) [1] TRUE 12/14 type.R: type_alike(`&&`, sd) [1] TRUE 12/14 type.R: type_alike(`&&`, sum) [1] TRUE 12/14 type.R: type_alike(sum, sd) [1] TRUE 12/14 type.R: type_alike(sum, c) [1] TRUE 12/14 type.R: type_alike(`&&`, `[`) [1] TRUE 12/14 type.R: type_alike(sd, 1:3) [1] "`1:3` should be type \"function\" (is \"integer\")" 12/14 type.R: type_alike(sd, var, vetr_settings(type.mode = 1)) [1] TRUE 12/14 type.R: type_alike(`&&`, sd, vetr_settings(type.mode = 1)) [1] "`sd` should be type \"special\" (is \"closure\")" 12/14 type.R: type_alike(`&&`, sum, vetr_settings(type.mode = 1)) [1] "`sum` should be type \"special\" (is \"builtin\")" 12/14 type.R: type_alike(sum, sd, vetr_settings(type.mode = 1)) [1] "`sd` should be type \"builtin\" (is \"closure\")" 12/14 type.R: type_alike(sum, c, vetr_settings(type.mode = 1)) [1] TRUE 12/14 type.R: type_alike(`&&`, `[`, vetr_settings(type.mode = 1)) [1] TRUE 13/14 validate.R: 13/14 validate.R: library(vetr) 13/14 validate.R: set.seed(1) 13/14 validate.R: unitizer_sect("Tokens Pass", { 13/14 validate.R: vet(INT.1, 1) [1] TRUE 13/14 validate.R: vet(INT.1.POS, 1) [1] TRUE 13/14 validate.R: vet(INT.1.NEG, -1) [1] TRUE 13/14 validate.R: vet(INT.1.POS.STR, 1) [1] TRUE 13/14 validate.R: vet(INT.1.NEG.STR, -1) [1] TRUE 13/14 validate.R: vet(INT, -1:1) [1] TRUE 13/14 validate.R: vet(INT.POS, 0:3) [1] TRUE 13/14 validate.R: vet(INT.NEG, 0:-3) [1] TRUE 13/14 validate.R: vet(INT.POS.STR, 1:3) [1] TRUE 13/14 validate.R: vet(INT.NEG.STR, -(1:3)) [1] TRUE 13/14 validate.R: vet(NUM.1, 1.44) [1] TRUE 13/14 validate.R: vet(NUM.1.POS, 1.44) [1] TRUE 13/14 validate.R: vet(NUM.1.NEG, -1.44) [1] TRUE 13/14 validate.R: vet(NUM, runif(5)) [1] TRUE 13/14 validate.R: vet(NUM.POS, runif(5)) [1] TRUE 13/14 validate.R: vet(NUM.NEG, -runif(5)) [1] TRUE 13/14 validate.R: vet(CHR, character()) [1] TRUE 13/14 validate.R: vet(CHR.1, "hello") [1] TRUE 13/14 validate.R: vet(CHR, letters) [1] TRUE 13/14 validate.R: vet(CPX, 1:10 + (0+0.5i)) [1] TRUE 13/14 validate.R: vet(CPX.1, 1 + (0+0.5i)) [1] TRUE 13/14 validate.R: vet(LGL, c(TRUE, FALSE)) [1] TRUE 13/14 validate.R: vet(LGL.1, TRUE) [1] TRUE 13/14 validate.R: unitizer_sect("Tokens Fail", { 13/14 validate.R: vet(INT.1, 1.2) [1] "`1.2` should be type \"integer-like\" (is \"double\")" 13/14 validate.R: vet(INT.1, 1:2) [1] "`length(1:2)` should be 1 (is 2)" 13/14 validate.R: vet(INT.1, NA_integer_) [1] "`NA_integer_` should not contain NAs, but does" 13/14 validate.R: vet(INT.1, Inf) [1] "`Inf` should be type \"integer-like\" (is \"double\")" 13/14 validate.R: vet(INT.1.POS, -1) [1] "`-1` should contain only positive values, but has negatives" 13/14 validate.R: vet(INT.1.POS, 1:2) [1] "`length(1:2)` should be 1 (is 2)" 13/14 validate.R: vet(INT.1.NEG, 1) [1] "`1` should contain only negative values, but has positives" 13/14 validate.R: vet(INT.1.NEG, -(1:2)) [1] "`length(-(1:2))` should be 1 (is 2)" 13/14 validate.R: vet(INT.1.POS.STR, 0) [1] "`0` should contain only \"strictly positive\" values, but has zeroes or negatives" 13/14 validate.R: vet(INT.1.NEG.STR, 0) [1] "`0` should contain only \"strictly negative\" values, but has zeroes or positives" 13/14 validate.R: vet(INT, c(-1:1, NA_integer_)) [1] "`c(-1:1, NA_integer_)` should not contain NAs, but does" 13/14 validate.R: vet(INT, letters) [1] "`letters` should be type \"integer-like\" (is \"character\")" 13/14 validate.R: vet(INT.POS, -(1:3)) [1] "`-(1:3)` should contain only positive values, but has negatives" 13/14 validate.R: vet(INT.NEG, 1:3) [1] "`1:3` should contain only negative values, but has positives" 13/14 validate.R: vet(INT.POS.STR, 0:3) [1] "`0:3` should contain only \"strictly positive\" values, but has zeroes or negatives" 13/14 validate.R: vet(INT.NEG.STR, -(0:3)) [1] "`-(0:3)` should contain only \"strictly negative\" values, but has zeroes or positives" 13/14 validate.R: vet(NUM.1, 1.44 + 1:2) [1] "`length(1.44 + 1:2)` should be 1 (is 2)" 13/14 validate.R: vet(NUM.1.POS, -runif(1) - 1) [1] "`-runif(1) - 1` should contain only positive values, but has negatives" 13/14 validate.R: vet(NUM.1.NEG, runif(1) + 1) [1] "`runif(1) + 1` should contain only negative values, but has positives" 13/14 validate.R: vet(NUM, c(NA_real_, 1)) [1] "`c(NA_real_, 1)` should not contain NAs, but does" 13/14 validate.R: vet(NUM, NULL) [1] "`NULL` should be type \"numeric\" (is \"NULL\")" 13/14 validate.R: vet(NUM.POS, -runif(5) - 1) [1] "`-runif(5) - 1` should contain only positive values, but has negatives" 13/14 validate.R: vet(NUM.NEG, runif(5) + 1) [1] "`runif(5) + 1` should contain only negative values, but has positives" 13/14 validate.R: vet(CHR.1, letters) [1] "`length(letters)` should be 1 (is 26)" 13/14 validate.R: vet(CHR, list(1, 2, 3)) [1] "`list(1, 2, 3)` should be type \"character\" (is \"list\")" 13/14 validate.R: vet(CPX, list(1, 2, 3)) [1] "`list(1, 2, 3)` should be type \"complex\" (is \"list\")" 13/14 validate.R: vet(CPX.1, list(1, 2, 3)) [1] "`list(1, 2, 3)` should be type \"complex\" (is \"list\")" 13/14 validate.R: vet(LGL, NA) [1] "`NA` should not contain NAs, but does" 13/14 validate.R: vet(LGL, letters) [1] "`letters` should be type \"logical\" (is \"character\")" 13/14 validate.R: vet(LGL.1, 1:2 == 1:2) [1] "`length(1:2 == 1:2)` should be 1 (is 2)" 13/14 validate.R: unitizer_sect("Custom expressions", { 13/14 validate.R: vet(. > 5, 1:10) [1] "`1:10 > 5` is not all TRUE (contains non-TRUE values)" 13/14 validate.R: vet(. > 5, 6:10) [1] TRUE 13/14 validate.R: vet(.(c(TRUE, NA, TRUE)), 1:5) [1] "`c(TRUE, NA, TRUE)` is not TRUE (contains NAs)" 13/14 validate.R: vet(.(1:5), 1:5) [1] "`1:5` is not TRUE (is \"integer\" instead of a \"logical\")" 13/14 validate.R: vet(.(1:5, 1:5), 1:5) Error in vet(.(1:5, 1:5), 1:5) : `.(` must be used with only one argument. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet 13/14 validate.R: vet(.(list(1, 2, 3)), 1:3) [1] "`list(1, 2, 3)` is not TRUE (is \"list\" instead of a \"logical\")" 13/14 validate.R: vet(.(c("hello world", "goodbye moon")), 1:3) [1] "`c(\"hello world\", \"goodbye moon\")` is not TRUE (is chr [1:2]: \"hello world\" ...)" 13/14 validate.R: unitizer_sect("Compound Expressions", { 13/14 validate.R: vet(INT.1 || NULL, 1) [1] TRUE 13/14 validate.R: vet(INT.1 || NULL, NULL) [1] TRUE 13/14 validate.R: vet(INT.1 || NULL, 1.4) [1] "`1.4` should be `NULL`, or type \"integer-like\" (is \"double\")" 13/14 validate.R: vet(INT.1 || NULL || character(3L), 1) [1] TRUE 13/14 validate.R: vet(INT.1 || NULL || character(3L), 1.2) [1] "`1.2` should be `NULL`, type \"character\", or type \"integer-like\" (is \"double\")" 13/14 validate.R: vet(INT.1 || NULL || character(3L), letters) [1] "At least one of these should pass:" [2] " - `length(letters)` should be 3 (is 26)" [3] " - `letters` should be `NULL`, or type \"integer-like\" (is \"character\")" 13/14 validate.R: vet((matrix(integer(), 0) && nrow(.) == ncol(.)) || NULL, matr [1] TRUE 13/14 validate.R: vet((matrix(integer(), 0) && nrow(.) == ncol(.)) || NULL, matr [1] "At least one of these should pass:" [2] " - `matrix(1:16, nrow = 2)` should be `NULL` (is \"integer\")" [3] " - `nrow(matrix(1:16, nrow = 2)) == ncol(matrix(1:16, nrow = 2))` is not TRUE (FALSE)" 13/14 validate.R: vet((matrix(integer(), 0) && nrow(.) == ncol(.)) || NULL, matr [1] "`matrix(runif(16), nrow = 4)` should be `NULL`, or type \"integer-like\" (is \"double\")" 13/14 validate.R: exp.a <- quote(all(. > 0)) 13/14 validate.R: exp.b <- quote(is.vector(.)) 13/14 validate.R: vet(exp.a && exp.b, -(1:3)) [1] "`all(-(1:3) > 0)` is not TRUE (FALSE)" 13/14 validate.R: local({ [1] TRUE 13/14 validate.R: vet(1 || "a" || 1 || "a" || 1 || letters, 1:3) [1] "At least one of these should pass:" [2] " - `1:3` should be type \"character\" (is \"integer\")" [3] " - `length(1:3)` should be 1 (is 3)" 13/14 validate.R: unitizer_sect("Other Return Modes", { 13/14 validate.R: vet(INT.1 || NULL || LGL, "hello", format = "text") [1] "`\"hello\"` should be `NULL`, type \"integer-like\", or type \"logical\" (is \"character\")" 13/14 validate.R: vet(INT.1 || NULL || LGL, "hello", format = "raw") [1] "`\"hello\"` should be `NULL`, type \"integer-like\", or type \"logical\" (is \"character\")" 13/14 validate.R: vet(INT.1 || NULL || LGL, "hello", format = "full") [1] "For argument `current`, `\"hello\"` should be `NULL`, type \"integer-like\", or type \"logical\" (is \"character\")" 13/14 validate.R: vet(INT.1 || NULL || LGL, "hello", format = "halloween") Error in vet(INT.1 || NULL || LGL, "hello", format = "halloween") : `vet` usage error: argument `format` must be one of "text", "raw", "full" Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet 13/14 validate.R: vet(INT.1 || NULL || LGL, "hello", format = 1:10) Error in vet(INT.1 || NULL || LGL, "hello", format = 1:10) : `vet` usage error: argument `format` must be character(1L). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet 13/14 validate.R: vet(INT.1 || NULL || LGL, "hello", format = "text", stop = TRU Error in vet(INT.1 || NULL || LGL, "hello", format = "text", stop = TRUE) : `"hello"` should be `NULL`, type "integer-like", or type "logical" (is "character") Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet 13/14 validate.R: vet(INT.1 || NULL || LGL, "hello", format = "text", stop = 1:3 Error in vet(INT.1 || NULL || LGL, "hello", format = "text", stop = 1:3) : `vet` usage error: argument `stop` must be TRUE or FALSE. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet 13/14 validate.R: unitizer_sect("Multi-line Stuff", { 13/14 validate.R: vet(NO.NA, c(234234131431, 123413413413, 1341341341, 123412341 [1] "c(234234131431, 123413413413, 1341341341, 12341234134, 562456234, \n 24624624, 2452345234, 2345234524, 23452452, 2243524352, 254254234, \n 2452452435, NA)\n should not contain NAs, but does" 13/14 validate.R: vet(NO.NA || !anyNA(.), c(234234131431, 123413413413, 13413413 [1] "At least one of these should pass:" [2] " - !anyNA(c(234234131431, 123413413413, 1341341341, 12341234134, \n 562456234, 24624624, 2452345234, 2345234524, 23452452, 2243524352, \n 254254234, 2452452435, NA))\n is not TRUE (FALSE)" [3] " - c(234234131431, 123413413413, 1341341341, 12341234134, 562456234, \n 24624624, 2452345234, 2345234524, 23452452, 2243524352, 254254234, \n 2452452435, NA)\n should not contain NAs, but does" 13/14 validate.R: vet(!anyNA(.), c(234234131431, 123413413413, 1341341341, 12341 [1] "!anyNA(c(234234131431, 123413413413, 1341341341, 12341234134, \n 562456234, 24624624, 2452345234, 2345234524, 23452452, 2243524352, \n 254254234, 2452452435, NA))\nis not TRUE (FALSE)" 13/14 validate.R: vet(!anyNA(.), c(234234131431, 123413413413, NA)) [1] "`!anyNA(c(234234131431, 123413413413, NA))` is not TRUE (FALSE)" 13/14 validate.R: val.exp <- quote(!anyNA(.)) 13/14 validate.R: vet(val.exp, c(234234131431, 123413413413, NA)) [1] "`!anyNA(c(234234131431, 123413413413, NA))` is not TRUE (FALSE)" 13/14 validate.R: unitizer_sect("Embedded String Errors", { 13/14 validate.R: vet(all_bw(., 0, 1), 0:5) [1] "`all_bw(0:5, 0, 1)` is not TRUE (is chr: \"`2` at index 3 not in `[0,1]`\")" 13/14 validate.R: vet(all.equal(., 1:5), 1:6) [1] "`all.equal(1:6, 1:5)` is not TRUE (is chr: \"Numeric: lengths (6, 5) differ\")" 13/14 validate.R: unitizer_sect("Language", { 13/14 validate.R: vet(quote(quote(a + b)), quote(x2 + x3)) [1] "`quote(x2 + x3)[[1]]` should be a call to `quote` (is a call to `+`)" 13/14 validate.R: x <- quote(quote(a + b)) 13/14 validate.R: vet(x, quote(x2 + x3)) [1] TRUE 13/14 validate.R: vet(quote(a + b), quote(2 + x3)) [1] "`quote(2 + x3)[[2]]` should be \"symbol\" (is \"double\")" 13/14 validate.R: vet(quote(a + b), quote(x1 + x2 + x3)) [1] "`quote(x1 + x2 + x3)[[2]]` should be \"symbol\" (is \"language\")" 13/14 validate.R: unlist(lapply(c("aaA", "bbB", "ccC", "ddD", "eeE"), find)) character(0) 13/14 validate.R: x <- quote(aaA + bbB) 13/14 validate.R: my.env <- new.env() 13/14 validate.R: my.env$y <- quote(ccC - ddD) 13/14 validate.R: evalq(vet(quote(x * y), quote(A * (B - C))), envir = my.env) [1] "`quote(A * (B - C))[[2]]` should be a call to `+` (is \"symbol\")" 13/14 validate.R: evalq(vet(quote(eeE * y), quote(A * (B - C))), envir = my.env) [1] TRUE 13/14 validate.R: evalq(vet(quote(x * y), quote((A + D) * (B - C))), envir = my. [1] TRUE 13/14 validate.R: expA <- expB <- expC <- expD <- expE <- 0 13/14 validate.R: expA <- quote(expB && expC) 13/14 validate.R: expB <- quote(expD * expE) 13/14 validate.R: expE <- quote(expA || expD) 13/14 validate.R: vet(expA, TRUE) Error in vet(expA, TRUE) : Possible infinite recursion encountered when substituting symbol `expA`. `vetr` recursively substitutes the vetting expressions. See `vignette('vetr', package='vetr')`, "Non Standard Evaluation" section. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet 13/14 validate.R: expE <- quote(expA) 13/14 validate.R: vet(expA, TRUE) Error in vet(expA, TRUE) : Possible infinite recursion encountered when substituting symbol `expA`. `vetr` recursively substitutes the vetting expressions. See `vignette('vetr', package='vetr')`, "Non Standard Evaluation" section. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet 13/14 validate.R: . <- quote(. > 0) 13/14 validate.R: vet(.., 1.4) [1] TRUE 13/14 validate.R: . <- quote(numeric(1L)) 13/14 validate.R: vet(.., 1.5) [1] TRUE 13/14 validate.R: unitizer_sect("Errors", { 13/14 validate.R: vet(1, 1, env = "hello") Error in vet(1, 1, env = "hello") : `vet` usage error: argument `env` must be an environment (is character). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet 13/14 validate.R: unitizer_sect("Custom tokens", { 13/14 validate.R: cust.tok.1 <- vet_token(quote(TRUE), "%sshould be logical(1L)" 13/14 validate.R: vet(cust.tok.1, TRUE) [1] TRUE 13/14 validate.R: vet(cust.tok.1, 1:2) [1] "`1:2` should be type \"logical\" (is \"integer\")" 13/14 validate.R: vet_token(quote(TRUE), "should be logical(1L)") Error in vet_token(quote(TRUE), "should be logical(1L)") : Argument `err.msg` must be character(1L) and contain a single '%s' for use by `sprintf`. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet_token 13/14 validate.R: vet_token(quote(TRUE), letters) Error in vet_token(quote(TRUE), letters) : Argument `err.msg` must be character(1L) and contain a single '%s' for use by `sprintf`. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet_token 13/14 validate.R: cust.tok.2 <- quote(. > 2) 13/14 validate.R: attr(cust.tok.2, "err.msg") <- letters 13/14 validate.R: vet(cust.tok.2, TRUE) Error in vet(cust.tok.2, TRUE) : "err.msg" attribute for validation token for argument `current` must be a one length character vector. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet 13/14 validate.R: unitizer_sect("Result Buffer", { 13/14 validate.R: set1 <- vetr_settings(result.list.size.init = 1) 13/14 validate.R: vet.exp <- quote(1 || 1:2 || 1:3 || 1:4 || 1:5 || 1:6 || 1:7 | 13/14 validate.R: vet(vet.exp, 1:8, settings = set1) [1] TRUE 13/14 validate.R: vet(vet.exp, 1:9, settings = set1) [1] "`length(1:9)` should be 1, 2, 3, 4, 5, 6, 7, or 8 (is 9)" 13/14 validate.R: set2 <- vetr_settings(result.list.size.init = 1, result.list.s 13/14 validate.R: vet(vet.exp, 1:8, settings = set2) Error in vet(vet.exp, 1:8, settings = set2) : Reached maximum vet token result buffer size (7); this should only happen if you have more than that number of tokens compounded with `||`. If that is the case, see description of `result.list.size` parameter for `?vetr_settings`. If not, contact maintainer. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet 13/14 validate.R: vet(vet.exp, 1:9, settings = set2) Error in vet(vet.exp, 1:9, settings = set2) : Reached maximum vet token result buffer size (7); this should only happen if you have more than that number of tokens compounded with `||`. If that is the case, see description of `result.list.size` parameter for `?vetr_settings`. If not, contact maintainer. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet 13/14 validate.R: set3 <- vetr_settings(result.list.size.init = 1, result.list.s 13/14 validate.R: vet(vet.exp, 1:8, settings = set3) [1] TRUE 13/14 validate.R: vet(vet.exp, 1:9, settings = set3) [1] "`length(1:9)` should be 1, 2, 3, 4, 5, 6, 7, or 8 (is 9)" 13/14 validate.R: set4 <- vetr_settings(result.list.size.init = "hello", result. 13/14 validate.R: set5 <- vetr_settings(result.list.size.init = 1, result.list.s 13/14 validate.R: vet(1, 1, settings = set4) Error in vet(1, 1, settings = set4) : Setting `result.list.size.init` must be integer-like (is character). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet 13/14 validate.R: vet(1, 1, settings = set5) Error in vet(1, 1, settings = set5) : Setting `result.list.size.max` must be integer-like (is character). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet 13/14 validate.R: unitizer_sect("pkg::fun calls (issue #100)", { 13/14 validate.R: vet(base::sum(.), 1:10) [1] "{base::sum(1:10)} is not TRUE (is \"integer\" instead of a \"logical\")" 13/14 validate.R: vet((base::.)(identity), is.function) [1] TRUE 13/14 validate.R: vet((base::.)(identity), is.integer) [1] "{base::is.integer(identity)} is not TRUE (FALSE)" 13/14 validate.R: unitizer_sect("promises (issue #106)", { 13/14 validate.R: env1 <- new.env() 13/14 validate.R: delayedAssign("x", stop("error 1"), assign.env = env1) 13/14 validate.R: env2 <- new.env() 13/14 validate.R: delayedAssign("x", stop("error 2"), assign.env = env2) 13/14 validate.R: env0 <- list2env(list(x = TRUE), new.env()) 13/14 validate.R: vet(env1, env0) Error in vet(env1, env0) : error 1 Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet 13/14 validate.R: vet(env0, env2) Error in vet(env0, env2) : error 2 Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet 14/14 validate.args.R: 14/14 validate.args.R: library(vetr) 14/14 validate.args.R: unitizer_sect("Single template validation", { 14/14 validate.args.R: fun0 <- function(x, y, z) vetr(x = matrix(integer(), ncol 14/14 validate.args.R: fun0(1, 2, 3) Error in fun0(x = 1, y = 2, z = 3) : For argument `x`, `1` should be "matrix" (is "numeric") Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun0 -> vetr 14/14 validate.args.R: fun0(matrix(1), 2, 3) Error in fun0(x = matrix(1), y = 2, z = 3) : For argument `x`, `matrix(1)` should have 3 columns (has 1) Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun0 -> vetr 14/14 validate.args.R: fun0(matrix(1:3, nrow = 1), 2, 3) Error in fun0(x = matrix(1:3, nrow = 1), y = 2, z = 3) : For argument `y`, `length(2)` should be 2 (is 1) Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun0 -> vetr 14/14 validate.args.R: fun0(matrix(1:3, nrow = 1), 2:3, 3) Error in fun0(x = matrix(1:3, nrow = 1), y = 2:3, z = 3) : For argument `z`, `3` should be type "logical" (is "double") Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun0 -> vetr 14/14 validate.args.R: fun0(matrix(1:3, nrow = 1), c(2, 3), 3) Error in fun0(x = matrix(1:3, nrow = 1), y = c(2, 3), z = 3) : For argument `z`, `3` should be type "logical" (is "double") Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun0 -> vetr 14/14 validate.args.R: fun0(matrix(1:3, nrow = 1), c(2, 3), TRUE) [1] TRUE 14/14 validate.args.R: unitizer_sect("Multi-template validation", { 14/14 validate.args.R: fun1 <- function(x, y, z) vetr(x = matrix(integer(), ncol 14/14 validate.args.R: fun1(1:3, "fail", "fail") Error in fun1(x = 1:3, y = "fail", z = "fail") : For argument `y`, `"fail"` should be `NULL`, type "integer-like", or type "logical" (is "character") Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun1 -> vetr 14/14 validate.args.R: fun1(matrix(1:9, ncol = 3), "fail", "fail") Error in fun1(x = matrix(1:9, ncol = 3), y = "fail", z = "fail") : For argument `y`, `"fail"` should be `NULL`, type "integer-like", or type "logical" (is "character") Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun1 -> vetr 14/14 validate.args.R: fun1(letters[1:3], "fail", "fail") Error in fun1(x = letters[1:3], y = "fail", z = "fail") : For argument `x`, `letters[1:3]` should be "matrix", or type "integer-like" (is "character") Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun1 -> vetr 14/14 validate.args.R: fun1(1:3, 1:2, "fail") Error in fun1(x = 1:3, y = 1:2, z = "fail") : For argument `z`, `"fail"` should be type "logical" (is "character") Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun1 -> vetr 14/14 validate.args.R: fun1(1:3, NULL, "fail") Error in fun1(x = 1:3, y = NULL, z = "fail") : For argument `z`, `"fail"` should be type "logical" (is "character") Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun1 -> vetr 14/14 validate.args.R: fun1(1:3, FALSE, "fail") Error in fun1(x = 1:3, y = FALSE, z = "fail") : For argument `z`, `"fail"` should be type "logical" (is "character") Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun1 -> vetr 14/14 validate.args.R: fun1(1:3, FALSE, FALSE) [1] TRUE 14/14 validate.args.R: unitizer_sect("Template and Straight Eval", { 14/14 validate.args.R: fun2 <- function(x, y, z) vetr(x = (matrix(integer(), nco 14/14 validate.args.R: fun2(matrix(c(1:8, NA), nrow = 3), NULL, NULL) Error in fun2(x = matrix(c(1:8, NA), nrow = 3), y = NULL, z = NULL) : For argument `x`, `!any(is.na(matrix(c(1:8, NA), nrow = 3)))` is not TRUE (FALSE) Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun2 -> vetr 14/14 validate.args.R: fun2(matrix(c(1:9), nrow = 3), -1:1, NULL) Error in fun2(x = matrix(c(1:9), nrow = 3), y = -1:1, z = NULL) : For argument `y`, `all(-1:1 > 0)` is not TRUE (FALSE) Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun2 -> vetr 14/14 validate.args.R: fun2(matrix(c(1:9), nrow = 3), 1:3, NA) Error in fun2(x = matrix(c(1:9), nrow = 3), y = 1:3, z = NA) : For argument `z`, `!is.na(NA)` is not TRUE (FALSE) Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun2 -> vetr 14/14 validate.args.R: fun2(matrix(c(1:9), nrow = 3), 1:3, TRUE) [1] TRUE 14/14 validate.args.R: unitizer_sect("Complex OR outcomes", { 14/14 validate.args.R: fun2a <- function(x) vetr(x = setNames(character(3L), let 14/14 validate.args.R: fun2a(letters[1:3]) Error in fun2a(x = letters[1:3]) : For argument `x` at least one of these should pass: - `letters[1:3]` should be "matrix", or type "list" (is "character") - `letters[1:3]` should have attribute "names" Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun2a -> vetr 14/14 validate.args.R: unitizer_sect("Errors in Arguments", { 14/14 validate.args.R: fun3 <- function(x, y) vetr(x = logical(1L), y = integer( 14/14 validate.args.R: fun3(stop("boom")) Error: boom Error in fun3(x = stop("boom")) : Argument `x` produced error during evaluation; see previous error. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun3 -> vetr 14/14 validate.args.R: fun3(TRUE, stop("boomBOOM")) Error: boomBOOM Error in fun3(x = TRUE, y = stop("boomBOOM")) : Argument `y` produced error during evaluation; see previous error. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun3 -> vetr 14/14 validate.args.R: fun3(1:3, stop("boomBOOM")) Error in fun3(x = 1:3, y = stop("boomBOOM")) : For argument `x`, `1:3` should be type "logical" (is "integer") Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun3 -> vetr 14/14 validate.args.R: fun4 <- function(x, y) vetr(x = stop("BOOM"), y = integer 14/14 validate.args.R: fun4(NULL, 1:3) Error: BOOM Error in vetr(x = stop("BOOM"), y = integer(3L)) : Validation expression for argument `x` produced an error (see previous error). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun4 -> vetr 14/14 validate.args.R: fun5 <- function(x, y) vetr(x = integer(3L), y = NULL || 14/14 validate.args.R: fun5(1:3, NULL) [1] TRUE 14/14 validate.args.R: fun5(1:2, NULL) Error in fun5(x = 1:2, y = NULL) : For argument `x`, `length(1:2)` should be 3 (is 2) Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun5 -> vetr 14/14 validate.args.R: fun6 <- function(x, y) vetr(x = integer(3L), y = NULL && 14/14 validate.args.R: fun6(1:3, NULL) Error: hah Error in vetr(x = integer(3L), y = NULL && .(stop("hah"))) : Validation expression for argument `y` produced an error (see previous error). Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun6 -> vetr 14/14 validate.args.R: unitizer_sect("Args evaled in correct env?", { 14/14 validate.args.R: fun7 <- function(x, y = z + 2) { 14/14 validate.args.R: fun7a <- function(x, y = z + 2) { 14/14 validate.args.R: z <- 1 14/14 validate.args.R: fun7(TRUE) Error in z + 2 : non-numeric argument to binary operator Error in fun7(x = TRUE) : Argument `y` produced error during evaluation; see previous error. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun7 -> vetr 14/14 validate.args.R: fun7a(TRUE) [1] TRUE 14/14 validate.args.R: fun8 <- function(x, y = z + 2) { 14/14 validate.args.R: fun8a <- function(x, y = z + 2) { 14/14 validate.args.R: a <- NULL 14/14 validate.args.R: b <- TRUE 14/14 validate.args.R: fun8(a && b) Error in a && b : invalid 'x' type in 'x && y' Error in fun8(x = a && b) : Argument `x` produced error during evaluation; see previous error. Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun8 -> vetr 14/14 validate.args.R: a <- TRUE 14/14 validate.args.R: fun8a(a && b) [1] TRUE 14/14 validate.args.R: fun_make <- function() { 14/14 validate.args.R: fun <- fun_make() 14/14 validate.args.R: a <- b <- 1:9 14/14 validate.args.R: local({ Error in fun(x = a) : For argument `x`, `a` should be "matrix" (is "character") Calls: local ... eval.parent -> eval -> eval -> eval -> eval -> fun -> vetr 14/14 validate.args.R: local({ Error in fun(x = b) : For argument `x`, `b` should be "matrix" (is "character") Calls: local ... eval.parent -> eval -> eval -> eval -> eval -> fun -> vetr 14/14 validate.args.R: fun8b <- function(x) vetr(x = length(.) > 0 && integer()) 14/14 validate.args.R: get("zfqwefkj") Error in get("zfqwefkj") : object 'zfqwefkj' not found Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> get 14/14 validate.args.R: local({ [1] TRUE 14/14 validate.args.R: unitizer_sect("Compound Expression Scope Issues", { 14/14 validate.args.R: a <- quote(!anyNA(.)) 14/14 validate.args.R: fun <- function(x) { 14/14 validate.args.R: fun(-(1:3)) Error in fun(x = -(1:3)) : For argument `x`, `all(-(1:3) > 0)` is not TRUE (FALSE) Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun -> vetr 14/14 validate.args.R: unitizer_sect("Non-equal args and validation exps", { 14/14 validate.args.R: fun8 <- function(x = "hello", y = TRUE, z) vetr(x = integ 14/14 validate.args.R: fun8(1L, NULL, 1:2) [1] TRUE 14/14 validate.args.R: fun8(1L, 1:2, NULL) Error in fun8(x = 1L, y = 1:2, z = NULL) : For argument `z`, `NULL` should be type "integer-like" (is "NULL") Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun8 -> vetr 14/14 validate.args.R: fun8(1L, 1:2) Error in fun8(x = 1L, y = 1:2) : argument `z` is missing, with no default Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun8 -> vetr 14/14 validate.args.R: fun8(1L) Error in fun8(x = 1L) : argument `z` is missing, with no default Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun8 -> vetr 14/14 validate.args.R: fun8(z = 1:2) Error in fun8(z = 1:2) : For argument `x`, `"hello"` should be type "integer-like" (is "character") Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun8 -> vetr 14/14 validate.args.R: unitizer_sect("Referencing argument in vet exp error", { 14/14 validate.args.R: fun1 <- function(x, y) vetr(x > 0, . < 3) 14/14 validate.args.R: fun1(1:10, 1:10) Error in vetr(x > 0, . < 3) : vet/vetr usage error: found symbol `x` in vetting token for object with the same symbol. Please use `.` to reference the object being checked by the vetting token (e.g. use `vet(. > 0, x)` instead of `vet(x > 0, x)`) Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun1 -> vetr 14/14 validate.args.R: fun2 <- function(x, y) vetr(. > 0 && all(y > 0), y < 3) 14/14 validate.args.R: fun2(TRUE, 1:10) Error in vetr(. > 0 && all(y > 0), y < 3) : vet/vetr usage error: found symbol `y` in vetting token for object with the same symbol. Please use `.` to reference the object being checked by the vetting token (e.g. use `vet(. > 0, x)` instead of `vet(x > 0, x)`) Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun2 -> vetr 14/14 validate.args.R: x <- 1:10 14/14 validate.args.R: vet(x > 0, x) Error in vet(x > 0, x) : vet/vetr usage error: found symbol `x` in vetting token for object with the same symbol. Please use `.` to reference the object being checked by the vetting token (e.g. use `vet(. > 0, x)` instead of `vet(x > 0, x)`) Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> vet 14/14 validate.args.R: vet((x + 1) > 0, x + 1) [1] "`x + 1` should be type \"logical\" (is \"double\")" 14/14 validate.args.R: unitizer_sect("Default arg mix-up", { 14/14 validate.args.R: fun10a <- function(x, y = TRUE, z = 999) vetr(INT, LGL.1, 14/14 validate.args.R: fun10a(1, z = 1:3) Error in fun10a(x = 1, z = 1:3) : For argument `z`, `length(1:3)` should be 1 (is 3) Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun10a -> vetr 14/14 validate.args.R: fun10b <- function(x, y = TRUE, z = 999) vetr(INT, z = IN 14/14 validate.args.R: fun10b(1, z = 1:3) Error in fun10b(x = 1, z = 1:3) : For argument `z`, `length(1:3)` should be 1 (is 3) Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fun10b -> vetr 14/14 validate.args.R: unitizer_sect("Dots", { 14/14 validate.args.R: f <- function(x, y = 1L, z = 1L, ...) vetr(1L, 1L, 1L) 14/14 validate.args.R: f(2L, w = 3L) [1] TRUE 14/14 validate.args.R: f <- function(x, y = 1L, ...) vetr(1L, 1L, 1L) 14/14 validate.args.R: f(2L, z = 3L) Warning in vetr(1L, 1L, 1L) : `...` vetting is not supported. [1] TRUE 14/14 validate.args.R: unitizer_sect("Don't access promises in environments", { 14/14 validate.args.R: fenv <- function(env) vetr(environment()) 14/14 validate.args.R: env <- FALSE 14/14 validate.args.R: fenv(environment()) Error in fenv(env = environment()) : For argument `env`, `environment()$env` should be type "environment" (is "logical") Calls: local ... withCallingHandlers -> eval -> eval -> withVisible -> fenv -> vetr 14/14 validate.args.R: unitizer_sect("Invocation via `do.call` (#109)", { 14/14 validate.args.R: f <- function(x) vetr(is.function(.)) 14/14 validate.args.R: do.call(f, list(mean)) [1] TRUE Prepping Unitizers... Warning in history_capt(history, interactive.mode) : Unable to capture history in non-interactive mode. | Summary of files in common directory 'unitizer': | | Pass Fail | 1. abstract.R 35 - | *2. alike.R 196 2 | 3. all-bw.R 207 - | 4. classes.R 22 - | 5. cstringr.R 82 - | 6. eval.R 30 - | *7. internal.R 185 2 | 8. language.R 55 - | 9. misc.R 17 - | 10. parse.R 49 - | 11. tev.R 2 - | 12. type.R 41 - | 13. validate.R 117 - | 14. validate.args.R 49 - | ............................... | 1087 4 | Legend: | * `unitizer` requires review +------------------------------------------------------------------------------+ | unitizer for: unitizer/alike.R | +------------------------------------------------------------------------------+ Pass Fail Atomic 13 - lists 12 - NULL values as wildcards 5 - Matrix / Arrays 11 - Data Frames 15 - Time Series 6 - Factors 5 - Environments / Pairlists 17 - Calls / Formulas 37 - Functions 6 1 settings 17 1 Examples 30 - Raw 1 - Errors 8 - Attributes 13 - .................................... 196 2 = Functions ==================================================================== - Failed ----------------------------------------------------------------------- | The following test failed because the new evaluation does not match the | reference value from the store. Overwrite with new result ([Y]es, [N]o, | [P]rev, [B]rowse, [R]erun, [QQ]uit All, [Q]uit, [H]elp)? # TRUE > alike(`&&`, function() NULL) | Value mismatch: < .ref > .new @@ 1 @@ @@ 1 @@ < [1] TRUE > NULL | Conditions mismatch: < .REF$conditions > .NEW$conditions @@ 1 / 1,3 @@ < Empty condition list > Condition list with 1 condition: > 1. Error in alike(`&&`, function() NULL) : argument of type NILSXP is not a > closure | State mismatch; see `.DIFF$state` for details. = settings ===================================================================== - Failed ----------------------------------------------------------------------- | The following test failed because the new evaluation does not match the | reference value from the store. Overwrite with new result ([Y]es, [N]o, | [P]rev, [B]rowse, [R]erun, [QQ]uit All, [Q]uit, [H]elp)? # FALSE > alike(`&&`, function() NULL, settings = vetr_settings(type.mode = 1)) | Value mismatch: < .ref > .new @@ 1 @@ @@ 1 @@ < [1] "`function() NULL` should be type > NULL : \"special\" (is \"closure\")" ~ | Conditions mismatch: < .REF$conditions > .NEW$conditions @@ 1 / 1,3 @@ < Empty condition list > Condition list with 1 condition: > 1. Error in alike(`&&`, function() NULL, settings = vetr_settings(type.mode = > 1)) : argument of type NILSXP is not a closure | State mismatch; see `.DIFF$state` for details. | User input required to proceed, but we are in non-interactive mode. | unitizer unchanged. +------------------------------------------------------------------------------+ | unitizer for: unitizer/internal.R | +------------------------------------------------------------------------------+ Pass Fail Name like attributes 6 - S3 Classes 12 - Dimnames 25 - Dims 18 - Time Series 9 - All Attributes, default 20 - All attributes, strict 13 - Closures 23 2 Env Track 4 - valid names 10 - Is dfish 3 - syntactic 9 - Pad or Quote 4 - Merge messages 10 - Hash 10 - Mode 6 - Find funs 3 - ................................... 185 2 = Closures ===================================================================== - Failed ----------------------------------------------------------------------- | The 2 tests in this section failed because the new evaluations do not match | the reference values from the store. Overwrite with new results ([Y]es, [N]o, | [P]rev, [B]rowse, [R]erun, [QQ]uit All, [Q]uit, [H]elp)? # FALSE, argless specials > vetr:::fun_alike(`[`, substitute) | Value mismatch: < .ref > .new @@ 1,2 @@ @@ 1 @@ < [1] "not have" "any arguments" > NULL < [3] "" "" ~ | Conditions mismatch: < .REF$conditions > .NEW$conditions @@ 1 / 1,3 @@ < Empty condition list > Condition list with 1 condition: > 1. Error in vetr:::fun_alike(`[`, substitute) : argument of type NILSXP is not > a closure | State mismatch; see `.DIFF$state` for details. # TRUE, argless specials > vetr:::fun_alike(`[`, `&&`) | Value mismatch: < .ref > .new @@ 1 @@ @@ 1 @@ < [1] TRUE > NULL | Conditions mismatch: < .REF$conditions > .NEW$conditions @@ 1 / 1,3 @@ < Empty condition list > Condition list with 1 condition: > 1. Error in vetr:::fun_alike(`[`, `&&`) : argument of type NILSXP is not a > closure | State mismatch; see `.DIFF$state` for details. | User input required to proceed, but we are in non-interactive mode. | unitizer unchanged. | * Fail: alike(`&&`, function() NULL) | * Fail: alike(`&&`, function() NULL, settings = vetr_settings(type.mode = | 1)) | in 'unitizer/alike.R' | * Fail: vetr:::fun_alike(`[`, substitute) | * Fail: vetr:::fun_alike(`[`, `&&`) | in 'unitizer/internal.R' | Newly evaluated tests do not match unitizer (Pass: 1087, Fail: 4); see above | for more info, or run in interactive mode. | Running in transcript mode: only stderr text that is also part of a signalled | condition is in the test review section (scroll up to the evaluation section | for the rest). See `transcript` parameter in `?unitize`. Error in unitize_core(test.files = test.files, store.ids = store.ids, : Cannot proceed in non-interactive mode. Calls: local ... eval -> eval -> eval -> unitize_dir -> unitize_core Execution halted Flavor: r-devel-linux-x86_64-fedora-gcc

Version: 0.2.16
Check: compiled code
Result: NOTE File 'vetr/libs/x64/vetr.dll': Found non-API call to R: 'SETLENGTH' Compiled code should not call non-API entry points in R. See 'Writing portable packages' in the 'Writing R Extensions' manual. Flavor: r-devel-windows-x86_64