CRAN Package Check Results for Package collapse

Last updated on 2022-01-23 19:48:25 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 1.7.0 272.96 287.32 560.28 OK
r-devel-linux-x86_64-debian-gcc 1.7.0 214.00 143.36 357.36 ERROR
r-devel-linux-x86_64-fedora-clang 1.7.2 808.01 NOTE
r-devel-linux-x86_64-fedora-gcc 1.7.0 737.03 OK
r-devel-windows-x86_64-new-UL 1.7.0 414.00 333.00 747.00 OK
r-devel-windows-x86_64-new-TK 1.7.0 ERROR
r-patched-linux-x86_64 1.7.0 249.20 279.95 529.15 OK
r-release-linux-x86_64 1.7.0 242.52 282.08 524.60 OK
r-release-macos-arm64 1.7.0 ERROR
r-release-macos-x86_64 1.7.0 NOTE
r-release-windows-ix86+x86_64 1.7.0 577.00 525.00 1102.00 NOTE
r-oldrel-macos-x86_64 1.6.5 WARN
r-oldrel-windows-ix86+x86_64 1.7.0 598.00 406.00 1004.00 ERROR

Additional issues

LTO rchk

Check Details

Version: 1.7.0
Check: tests
Result: ERROR
     Running ‘testthat.R’ [21s/37s]
    Running the tests in ‘tests/testthat.R’ failed.
    Complete output:
     > # rm(list = ls())
     > # Sys.setenv("R_TESTS" = "")
     > library(testthat)
     > # library(collapse)
     >
     > test_check("collapse")
     Loading required package: collapse
     collapse 1.7.0, see ?`collapse-package` or ?`collapse-documentation`
    
     Attaching package: 'collapse'
    
     The following object is masked from 'package:stats':
    
     D
    
    
     *** caught segfault ***
     address 0x30, cause 'memory not mapped'
    
     Traceback:
     1: FUN(X[[i]], ...)
     2: lapply(gsplit(x, g), FUN, ...)
     3: unlist(lapply(gsplit(x, g), FUN, ...), FALSE, FALSE)
     4: copyMostAttributes(unlist(lapply(gsplit(x, g), FUN, ...), FALSE, FALSE), x)
     5: FUN(X[[i]], ...)
     6: lapply(data, copysplaplfun, by, FUN, ...)
     7: applyfuns_internal(xnnu, by, catFUN, namcatFUN %in% .FAST_STAT_FUN_EXT, parallel, mc.cores, ...)
     8: condsetn(applyfuns_internal(xnnu, by, catFUN, namcatFUN %in% .FAST_STAT_FUN_EXT, parallel, mc.cores, ...), namcatFUN, give.names)
     9: agg(if (nul) X[nu] else NULL, if (nnul) X[nnu] else NULL, ...)
     10: collap(wlddev, ~country + decade, bsum, Mode, na.rm = TRUE, keep.col.order = FALSE)
     11: setNames(unattrib(x), names(x))
     12: oa(collap(wlddev, ~country + decade, bsum, Mode, na.rm = TRUE, keep.col.order = FALSE))
     13: eval_bare(expr, quo_get_env(quo))
     14: quasi_label(enquo(object), label, arg = "object")
     15: expect_equal(oa(collap(wlddev, ~country + decade, bsum, Mode, na.rm = TRUE, keep.col.order = FALSE)), oa(cbind(g$groups, BY(get_vars(wlddev, c(4, 9:13)), g, bsum, na.rm = TRUE, use.g.names = FALSE), BY(get_vars(wlddev, c(2:3, 6:8)), g, Mode, na.rm = TRUE, use.g.names = FALSE))))
     16: eval(code, test_env)
     17: eval(code, test_env)
     18: withCallingHandlers({ eval(code, test_env) if (!handled && !is.null(test)) { skip_empty() }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error)
     19: doTryCatch(return(expr), name, parentenv, handler)
     20: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     21: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     22: doTryCatch(return(expr), name, parentenv, handler)
     23: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), names[nh], parentenv, handlers[[nh]])
     24: tryCatchList(expr, classes, parentenv, handlers)
     25: tryCatch(withCallingHandlers({ eval(code, test_env) if (!handled && !is.null(test)) { skip_empty() }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error), error = handle_fatal, skip = function(e) { })
     26: test_code(desc, code, env = parent.frame(), reporter = reporter)
     27: test_that("collap performs as intended in simple uses with base/stats functions", { expect_equal(oa(collap(mtcars, mtcars$cyl, bsum, keep.by = FALSE)), oa(fsum(mtcars, mtcars$cyl, use.g.names = FALSE))) expect_equal(oa(collap(mtcars, ~cyl, mean.default)), oa(fmean(mtcars, mtcars$cyl, use.g.names = FALSE))) expect_equal(oa(collap(mtcars, ~cyl, bmean)), oa(fmean(mtcars, mtcars$cyl, use.g.names = FALSE))) expect_equal(oa(collap(mtcars, mtcars[2], bsum, keep.by = FALSE)), oa(fsum(mtcars, mtcars$cyl, use.g.names = FALSE))) expect_equal(oa(collap(mtcars, ~cyl, bsum, keep.by = FALSE)), oa(fsum(mtcars[-2], mtcars$cyl, use.g.names = FALSE))) expect_equal(unattrib(collap(iris, ~Species, bsum, keep.by = FALSE)), unattrib(fsum(iris[-5], iris$Species, use.g.names = FALSE))) expect_equal(oa(collap(airquality, ~Month, bsum, na.rm = TRUE, keep.by = FALSE)), oa(fsum(airquality[-5], airquality$Month, use.g.names = FALSE))) expect_equal(oa(collap(wlddev, ~country + decade, bsum, Mode, na.rm = TRUE, keep.col.order = FALSE)), oa(cbind(g$groups, BY(get_vars(wlddev, c(4, 9:13)), g, bsum, na.rm = TRUE, use.g.names = FALSE), BY(get_vars(wlddev, c(2:3, 6:8)), g, Mode, na.rm = TRUE, use.g.names = FALSE)))) expect_equal(oa(collap(wlddev, ~country + decade, bsum, Mode, na.rm = TRUE)), oa(cbind(g$groups, BY(get_vars(wlddev, c(4, 9:13)), g, bsum, na.rm = TRUE, use.g.names = FALSE), BY(get_vars(wlddev, c(2:3, 6:8)), g, Mode, na.rm = TRUE, use.g.names = FALSE)))[order(c(1, 5, 4, 9:13, 2:3, 6:8))]) })
     28: eval(code, test_env)
     29: eval(code, test_env)
     30: withCallingHandlers({ eval(code, test_env) if (!handled && !is.null(test)) { skip_empty() }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error)
     31: doTryCatch(return(expr), name, parentenv, handler)
     32: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     33: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     34: doTryCatch(return(expr), name, parentenv, handler)
     35: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), names[nh], parentenv, handlers[[nh]])
     36: tryCatchList(expr, classes, parentenv, handlers)
     37: tryCatch(withCallingHandlers({ eval(code, test_env) if (!handled && !is.null(test)) { skip_empty() }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error), error = handle_fatal, skip = function(e) { })
     38: test_code(NULL, exprs, env)
     39: source_file(path, child_env(env), wrap = wrap)
     40: FUN(X[[i]], ...)
     41: lapply(test_paths, test_one_file, env = env, wrap = wrap)
     42: doTryCatch(return(expr), name, parentenv, handler)
     43: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     44: tryCatchList(expr, classes, parentenv, handlers)
     45: tryCatch(code, testthat_abort_reporter = function(cnd) { cat(conditionMessage(cnd), "\n") NULL})
     46: with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, wrap = wrap))
     47: test_files(test_dir = test_dir, test_package = test_package, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, wrap = wrap, load_package = load_package)
     48: test_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, wrap = wrap, load_package = load_package, parallel = parallel)
     49: test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed")
     50: test_check("collapse")
     An irrecoverable exception occurred. R is aborting now ...
     Segmentation fault
Flavor: r-devel-linux-x86_64-debian-gcc

Version: 1.7.2
Check: installed package size
Result: NOTE
     installed size is 17.7Mb
     sub-directories of 1Mb or more:
     libs 15.4Mb
Flavor: r-devel-linux-x86_64-fedora-clang

Version: 1.7.0
Check: package dependencies
Result: NOTE
    Package suggested but not available for checking: 'weights'
Flavor: r-devel-windows-x86_64-new-TK

Version: 1.7.0
Check: tests
Result: ERROR
     Running 'testthat.R'
    Running the tests in 'tests/testthat.R' failed.
    Complete output:
     > # rm(list = ls())
     > # Sys.setenv("R_TESTS" = "")
     > library(testthat)
     > # library(collapse)
     >
     > test_check("collapse")
     Loading required package: collapse
     collapse 1.7.0, see ?`collapse-package` or ?`collapse-documentation`
    
     Attaching package: 'collapse'
    
     The following object is masked from 'package:stats':
    
     D
    
     [ FAIL 1 | WARN 0 | SKIP 2 | PASS 12079 ]
    
     ══ Skipped tests ═══════════════════════════════════════════════════════════════
     • empty test (2)
    
     ══ Failed tests ════════════════════════════════════════════════════════════════
     ── Error (test-fmutate.R:272:3): fsummarise miscellaneous things ───────────────
     Error in `getenvFUN("weights_wtd.cors")`: For this method need to install.packages('weights'), then unload [detach('package:collapse', unload = TRUE)] and reload [library(collapse)].
     Backtrace:
     █
     1. ├─testthat::expect_equal(...) test-fmutate.R:272:2
     2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
     3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
     4. └─collapse::smr(...)
     5. └─base::eval(...)
     6. └─base::eval(...)
     7. └─collapse:::do_across(...)
     8. └─collapse:::.eval_funi(...)
     9. └─collapse:::dots_apply_grouped_bulk(...)
     10. ├─base::eval(FUN)
     11. │ └─base::eval(FUN)
     12. └─base::mapply(f, dsp, SIMPLIFY = FALSE, USE.NAMES = FALSE, w = as)
     13. └─(function (x, w = NULL) ...
     14. ├─collapse::qDF(pwcor(x, w = w), "var") test-fmutate.R:266:13
     15. └─collapse::pwcor(x, w = w)
     16. └─collapse:::getenvFUN("weights_wtd.cors")
    
     [ FAIL 1 | WARN 0 | SKIP 2 | PASS 12079 ]
     Error: Test failures
     Execution halted
Flavor: r-devel-windows-x86_64-new-TK

Version: 1.7.0
Check: installed package size
Result: NOTE
     installed size is 19.5Mb
     sub-directories of 1Mb or more:
     libs 17.2Mb
Flavors: r-release-macos-arm64, r-release-macos-x86_64, r-release-windows-ix86+x86_64, r-oldrel-windows-ix86+x86_64

Version: 1.7.0
Check: tests
Result: ERROR
     Running ‘testthat.R’ [41s/63s]
    Running the tests in ‘tests/testthat.R’ failed.
    Last 13 lines of output:
     fsum(c(NA_integer_, NA_integer_)) not identical to NA_integer_.
     1/1 mismatches
     [1] 0 - NA == NA
     ── Failure (test-fsum.R:524:3): Miscellaneous Issues with Integers ─────────────
     fsum(c(NA_integer_, NA_integer_), na.rm = FALSE) not identical to NA_integer_.
     1/1 mismatches
     [1] 0 - NA == NA
     ── Failure (test-fsum.R:526:3): Miscellaneous Issues with Integers ─────────────
     fsum(c(NA_integer_, 1L), na.rm = FALSE) not identical to NA_integer_.
     1/1 mismatches
     [1] 0 - NA == NA
    
     [ FAIL 11 | WARN 0 | SKIP 2 | PASS 12070 ]
     Error: Test failures
     Execution halted
Flavor: r-release-macos-arm64

Version: 1.6.5
Check: installed package size
Result: NOTE
     installed size is 15.9Mb
     sub-directories of 1Mb or more:
     libs 13.8Mb
Flavor: r-oldrel-macos-x86_64

Version: 1.6.5
Check: for unstated dependencies in examples
Result: WARN
    Warning: parse error in file 'lines':
    8: unexpected '>'
    55: giris <- group_by(iris, Species)
    56: giris |>
     ^
Flavor: r-oldrel-macos-x86_64

Version: 1.7.0
Check: for unstated dependencies in examples
Result: WARN
    Warning: parse error in file 'lines':
    8: unexpected '>'
    54: giris <- fgroup_by(iris, Species)
    55: giris |>
     ^
Flavor: r-oldrel-windows-ix86+x86_64

Version: 1.7.0
Check: running examples for arch ‘i386’
Result: ERROR
    Running examples in 'collapse-Ex.R' failed
    The error most likely occurred in:
    
    > ### Name: BY
    > ### Title: Split-Apply-Combine Computing
    > ### Aliases: BY BY.default BY.matrix BY.data.frame BY.grouped_df
    > ### Keywords: manip
    >
    > ### ** Examples
    >
    > v <- iris$Sepal.Length # A numeric vector
    > f <- GRP(iris$Species) # A grouping
    >
    > ## default vector method
    > BY(v, f, sum) # Sum by species
     setosa versicolor virginica
     250.3 296.8 329.4
    > head(BY(v, f, scale)) # Scale by species (please use fscale instead)
     setosa1 setosa2 setosa3 setosa4 setosa5 setosa6
     0.26667447 -0.30071802 -0.86811050 -1.15180675 -0.01702177 1.11776320
    > head(BY(v, f, scale, use.g.names = FALSE)) # Omitting auto-generated names
    [1] 0.26667447 -0.30071802 -0.86811050 -1.15180675 -0.01702177 1.11776320
    > BY(v, f, quantile) # Species quantiles: by default stacked
     setosa.0% setosa.25% setosa.50% setosa.75% setosa.100%
     4.300 4.800 5.000 5.200 5.800
     versicolor.0% versicolor.25% versicolor.50% versicolor.75% versicolor.100%
     4.900 5.600 5.900 6.300 7.000
     virginica.0% virginica.25% virginica.50% virginica.75% virginica.100%
     4.900 6.225 6.500 6.900 7.900
    > BY(v, f, quantile, expand.wide = TRUE) # Wide format
     0% 25% 50% 75% 100%
    setosa 4.3 4.800 5.0 5.2 5.8
    versicolor 4.9 5.600 5.9 6.3 7.0
    virginica 4.9 6.225 6.5 6.9 7.9
    >
    > ## matrix method
    > m <- qM(num_vars(iris))
    > BY(m, f, sum) # Also return as matrix
     Sepal.Length Sepal.Width Petal.Length Petal.Width
    setosa 250.3 171.4 73.1 12.3
    versicolor 296.8 138.5 213.0 66.3
    virginica 329.4 148.7 277.6 101.3
    > BY(m, f, sum, return = "data.frame") # Return as data.frame.. also works for computations below
     Sepal.Length Sepal.Width Petal.Length Petal.Width
    setosa 250.3 171.4 73.1 12.3
    versicolor 296.8 138.5 213.0 66.3
    virginica 329.4 148.7 277.6 101.3
    > head(BY(m, f, scale))
     Sepal.Length Sepal.Width Petal.Length Petal.Width
    setosa1 0.26667447 0.1899414 -0.3570112 -0.4364923
    setosa2 -0.30071802 -1.1290958 -0.3570112 -0.4364923
    setosa3 -0.86811050 -0.6014810 -0.9328358 -0.4364923
    setosa4 -1.15180675 -0.8652884 0.2188133 -0.4364923
    setosa5 -0.01702177 0.4537488 -0.3570112 -0.4364923
    setosa6 1.11776320 1.2451711 1.3704625 1.4613004
    > head(BY(m, f, scale, use.g.names = FALSE))
     Sepal.Length Sepal.Width Petal.Length Petal.Width
    [1,] 0.26667447 0.1899414 -0.3570112 -0.4364923
    [2,] -0.30071802 -1.1290958 -0.3570112 -0.4364923
    [3,] -0.86811050 -0.6014810 -0.9328358 -0.4364923
    [4,] -1.15180675 -0.8652884 0.2188133 -0.4364923
    [5,] -0.01702177 0.4537488 -0.3570112 -0.4364923
    [6,] 1.11776320 1.2451711 1.3704625 1.4613004
    > BY(m, f, quantile)
     Sepal.Length Sepal.Width Petal.Length Petal.Width
    setosa.0% 4.300 2.300 1.000 0.1
    setosa.25% 4.800 3.200 1.400 0.2
    setosa.50% 5.000 3.400 1.500 0.2
    setosa.75% 5.200 3.675 1.575 0.3
    setosa.100% 5.800 4.400 1.900 0.6
    versicolor.0% 4.900 2.000 3.000 1.0
    versicolor.25% 5.600 2.525 4.000 1.2
    versicolor.50% 5.900 2.800 4.350 1.3
    versicolor.75% 6.300 3.000 4.600 1.5
    versicolor.100% 7.000 3.400 5.100 1.8
    virginica.0% 4.900 2.200 4.500 1.4
    virginica.25% 6.225 2.800 5.100 1.8
    virginica.50% 6.500 3.000 5.550 2.0
    virginica.75% 6.900 3.175 5.875 2.3
    virginica.100% 7.900 3.800 6.900 2.5
    > BY(m, f, quantile, expand.wide = TRUE)
     Sepal.Length.0% Sepal.Length.25% Sepal.Length.50% Sepal.Length.75%
    setosa 4.3 4.800 5.0 5.2
    versicolor 4.9 5.600 5.9 6.3
    virginica 4.9 6.225 6.5 6.9
     Sepal.Length.100% Sepal.Width.0% Sepal.Width.25% Sepal.Width.50%
    setosa 5.8 2.3 3.200 3.4
    versicolor 7.0 2.0 2.525 2.8
    virginica 7.9 2.2 2.800 3.0
     Sepal.Width.75% Sepal.Width.100% Petal.Length.0% Petal.Length.25%
    setosa 3.675 4.4 1.0 1.4
    versicolor 3.000 3.4 3.0 4.0
    virginica 3.175 3.8 4.5 5.1
     Petal.Length.50% Petal.Length.75% Petal.Length.100% Petal.Width.0%
    setosa 1.50 1.575 1.9 0.1
    versicolor 4.35 4.600 5.1 1.0
    virginica 5.55 5.875 6.9 1.4
     Petal.Width.25% Petal.Width.50% Petal.Width.75% Petal.Width.100%
    setosa 0.2 0.2 0.3 0.6
    versicolor 1.2 1.3 1.5 1.8
    virginica 1.8 2.0 2.3 2.5
    > BY(m, f, quantile, expand.wide = TRUE, # Return as list of matrices
    + return = "list")
    $Sepal.Length
     0% 25% 50% 75% 100%
    setosa 4.3 4.800 5.0 5.2 5.8
    versicolor 4.9 5.600 5.9 6.3 7.0
    virginica 4.9 6.225 6.5 6.9 7.9
    
    $Sepal.Width
     0% 25% 50% 75% 100%
    setosa 2.3 3.200 3.4 3.675 4.4
    versicolor 2.0 2.525 2.8 3.000 3.4
    virginica 2.2 2.800 3.0 3.175 3.8
    
    $Petal.Length
     0% 25% 50% 75% 100%
    setosa 1.0 1.4 1.50 1.575 1.9
    versicolor 3.0 4.0 4.35 4.600 5.1
    virginica 4.5 5.1 5.55 5.875 6.9
    
    $Petal.Width
     0% 25% 50% 75% 100%
    setosa 0.1 0.2 0.2 0.3 0.6
    versicolor 1.0 1.2 1.3 1.5 1.8
    virginica 1.4 1.8 2.0 2.3 2.5
    
    >
    > ## data.frame method
    > BY(num_vars(iris), f, sum) # Also returns a data.fram
     Sepal.Length Sepal.Width Petal.Length Petal.Width
    setosa 250.3 171.4 73.1 12.3
    versicolor 296.8 138.5 213.0 66.3
    virginica 329.4 148.7 277.6 101.3
    > BY(num_vars(iris), f, sum, return = 2) # Return as matrix.. also works for computations below
     Sepal.Length Sepal.Width Petal.Length Petal.Width
    setosa 250.3 171.4 73.1 12.3
    versicolor 296.8 138.5 213.0 66.3
    virginica 329.4 148.7 277.6 101.3
    > head(BY(num_vars(iris), f, scale))
     Sepal.Length Sepal.Width Petal.Length Petal.Width
    setosa1 0.26667447 0.1899414 -0.3570112 -0.4364923
    setosa2 -0.30071802 -1.1290958 -0.3570112 -0.4364923
    setosa3 -0.86811050 -0.6014810 -0.9328358 -0.4364923
    setosa4 -1.15180675 -0.8652884 0.2188133 -0.4364923
    setosa5 -0.01702177 0.4537488 -0.3570112 -0.4364923
    setosa6 1.11776320 1.2451711 1.3704625 1.4613004
    > head(BY(num_vars(iris), f, scale, use.g.names = FALSE))
     Sepal.Length Sepal.Width Petal.Length Petal.Width
    1 0.26667447 0.1899414 -0.3570112 -0.4364923
    2 -0.30071802 -1.1290958 -0.3570112 -0.4364923
    3 -0.86811050 -0.6014810 -0.9328358 -0.4364923
    4 -1.15180675 -0.8652884 0.2188133 -0.4364923
    5 -0.01702177 0.4537488 -0.3570112 -0.4364923
    6 1.11776320 1.2451711 1.3704625 1.4613004
    > BY(num_vars(iris), f, quantile)
     Sepal.Length Sepal.Width Petal.Length Petal.Width
    setosa.0% 4.300 2.300 1.000 0.1
    setosa.25% 4.800 3.200 1.400 0.2
    setosa.50% 5.000 3.400 1.500 0.2
    setosa.75% 5.200 3.675 1.575 0.3
    setosa.100% 5.800 4.400 1.900 0.6
    versicolor.0% 4.900 2.000 3.000 1.0
    versicolor.25% 5.600 2.525 4.000 1.2
    versicolor.50% 5.900 2.800 4.350 1.3
    versicolor.75% 6.300 3.000 4.600 1.5
    versicolor.100% 7.000 3.400 5.100 1.8
    virginica.0% 4.900 2.200 4.500 1.4
    virginica.25% 6.225 2.800 5.100 1.8
    virginica.50% 6.500 3.000 5.550 2.0
    virginica.75% 6.900 3.175 5.875 2.3
    virginica.100% 7.900 3.800 6.900 2.5
    > BY(num_vars(iris), f, quantile, expand.wide = TRUE)
     Sepal.Length.0% Sepal.Length.25% Sepal.Length.50% Sepal.Length.75%
    setosa 4.3 4.800 5.0 5.2
    versicolor 4.9 5.600 5.9 6.3
    virginica 4.9 6.225 6.5 6.9
     Sepal.Length.100% Sepal.Width.0% Sepal.Width.25% Sepal.Width.50%
    setosa 5.8 2.3 3.200 3.4
    versicolor 7.0 2.0 2.525 2.8
    virginica 7.9 2.2 2.800 3.0
     Sepal.Width.75% Sepal.Width.100% Petal.Length.0% Petal.Length.25%
    setosa 3.675 4.4 1.0 1.4
    versicolor 3.000 3.4 3.0 4.0
    virginica 3.175 3.8 4.5 5.1
     Petal.Length.50% Petal.Length.75% Petal.Length.100% Petal.Width.0%
    setosa 1.50 1.575 1.9 0.1
    versicolor 4.35 4.600 5.1 1.0
    virginica 5.55 5.875 6.9 1.4
     Petal.Width.25% Petal.Width.50% Petal.Width.75% Petal.Width.100%
    setosa 0.2 0.2 0.3 0.6
    versicolor 1.2 1.3 1.5 1.8
    virginica 1.8 2.0 2.3 2.5
    > BY(num_vars(iris), f, quantile, # Return as list of matrices
    + expand.wide = TRUE, return = "list")
    $Sepal.Length
     0% 25% 50% 75% 100%
    setosa 4.3 4.800 5.0 5.2 5.8
    versicolor 4.9 5.600 5.9 6.3 7.0
    virginica 4.9 6.225 6.5 6.9 7.9
    
    $Sepal.Width
     0% 25% 50% 75% 100%
    setosa 2.3 3.200 3.4 3.675 4.4
    versicolor 2.0 2.525 2.8 3.000 3.4
    virginica 2.2 2.800 3.0 3.175 3.8
    
    $Petal.Length
     0% 25% 50% 75% 100%
    setosa 1.0 1.4 1.50 1.575 1.9
    versicolor 3.0 4.0 4.35 4.600 5.1
    virginica 4.5 5.1 5.55 5.875 6.9
    
    $Petal.Width
     0% 25% 50% 75% 100%
    setosa 0.1 0.2 0.2 0.3 0.6
    versicolor 1.0 1.2 1.3 1.5 1.8
    virginica 1.4 1.8 2.0 2.3 2.5
    
    >
    > ## grouped data frame method
    > giris <- fgroup_by(iris, Species)
    > giris |> BY(sum) # Compute sum
    Error: unexpected '>' in "giris |>"
    Execution halted
Flavor: r-oldrel-windows-ix86+x86_64

Version: 1.7.0
Check: running examples for arch ‘x64’
Result: ERROR
    Running examples in 'collapse-Ex.R' failed
    The error most likely occurred in:
    
    > ### Name: BY
    > ### Title: Split-Apply-Combine Computing
    > ### Aliases: BY BY.default BY.matrix BY.data.frame BY.grouped_df
    > ### Keywords: manip
    >
    > ### ** Examples
    >
    > v <- iris$Sepal.Length # A numeric vector
    > f <- GRP(iris$Species) # A grouping
    >
    > ## default vector method
    > BY(v, f, sum) # Sum by species
     setosa versicolor virginica
     250.3 296.8 329.4
    > head(BY(v, f, scale)) # Scale by species (please use fscale instead)
     setosa1 setosa2 setosa3 setosa4 setosa5 setosa6
     0.26667447 -0.30071802 -0.86811050 -1.15180675 -0.01702177 1.11776320
    > head(BY(v, f, scale, use.g.names = FALSE)) # Omitting auto-generated names
    [1] 0.26667447 -0.30071802 -0.86811050 -1.15180675 -0.01702177 1.11776320
    > BY(v, f, quantile) # Species quantiles: by default stacked
     setosa.0% setosa.25% setosa.50% setosa.75% setosa.100%
     4.300 4.800 5.000 5.200 5.800
     versicolor.0% versicolor.25% versicolor.50% versicolor.75% versicolor.100%
     4.900 5.600 5.900 6.300 7.000
     virginica.0% virginica.25% virginica.50% virginica.75% virginica.100%
     4.900 6.225 6.500 6.900 7.900
    > BY(v, f, quantile, expand.wide = TRUE) # Wide format
     0% 25% 50% 75% 100%
    setosa 4.3 4.800 5.0 5.2 5.8
    versicolor 4.9 5.600 5.9 6.3 7.0
    virginica 4.9 6.225 6.5 6.9 7.9
    >
    > ## matrix method
    > m <- qM(num_vars(iris))
    > BY(m, f, sum) # Also return as matrix
     Sepal.Length Sepal.Width Petal.Length Petal.Width
    setosa 250.3 171.4 73.1 12.3
    versicolor 296.8 138.5 213.0 66.3
    virginica 329.4 148.7 277.6 101.3
    > BY(m, f, sum, return = "data.frame") # Return as data.frame.. also works for computations below
     Sepal.Length Sepal.Width Petal.Length Petal.Width
    setosa 250.3 171.4 73.1 12.3
    versicolor 296.8 138.5 213.0 66.3
    virginica 329.4 148.7 277.6 101.3
    > head(BY(m, f, scale))
     Sepal.Length Sepal.Width Petal.Length Petal.Width
    setosa1 0.26667447 0.1899414 -0.3570112 -0.4364923
    setosa2 -0.30071802 -1.1290958 -0.3570112 -0.4364923
    setosa3 -0.86811050 -0.6014810 -0.9328358 -0.4364923
    setosa4 -1.15180675 -0.8652884 0.2188133 -0.4364923
    setosa5 -0.01702177 0.4537488 -0.3570112 -0.4364923
    setosa6 1.11776320 1.2451711 1.3704625 1.4613004
    > head(BY(m, f, scale, use.g.names = FALSE))
     Sepal.Length Sepal.Width Petal.Length Petal.Width
    [1,] 0.26667447 0.1899414 -0.3570112 -0.4364923
    [2,] -0.30071802 -1.1290958 -0.3570112 -0.4364923
    [3,] -0.86811050 -0.6014810 -0.9328358 -0.4364923
    [4,] -1.15180675 -0.8652884 0.2188133 -0.4364923
    [5,] -0.01702177 0.4537488 -0.3570112 -0.4364923
    [6,] 1.11776320 1.2451711 1.3704625 1.4613004
    > BY(m, f, quantile)
     Sepal.Length Sepal.Width Petal.Length Petal.Width
    setosa.0% 4.300 2.300 1.000 0.1
    setosa.25% 4.800 3.200 1.400 0.2
    setosa.50% 5.000 3.400 1.500 0.2
    setosa.75% 5.200 3.675 1.575 0.3
    setosa.100% 5.800 4.400 1.900 0.6
    versicolor.0% 4.900 2.000 3.000 1.0
    versicolor.25% 5.600 2.525 4.000 1.2
    versicolor.50% 5.900 2.800 4.350 1.3
    versicolor.75% 6.300 3.000 4.600 1.5
    versicolor.100% 7.000 3.400 5.100 1.8
    virginica.0% 4.900 2.200 4.500 1.4
    virginica.25% 6.225 2.800 5.100 1.8
    virginica.50% 6.500 3.000 5.550 2.0
    virginica.75% 6.900 3.175 5.875 2.3
    virginica.100% 7.900 3.800 6.900 2.5
    > BY(m, f, quantile, expand.wide = TRUE)
     Sepal.Length.0% Sepal.Length.25% Sepal.Length.50% Sepal.Length.75%
    setosa 4.3 4.800 5.0 5.2
    versicolor 4.9 5.600 5.9 6.3
    virginica 4.9 6.225 6.5 6.9
     Sepal.Length.100% Sepal.Width.0% Sepal.Width.25% Sepal.Width.50%
    setosa 5.8 2.3 3.200 3.4
    versicolor 7.0 2.0 2.525 2.8
    virginica 7.9 2.2 2.800 3.0
     Sepal.Width.75% Sepal.Width.100% Petal.Length.0% Petal.Length.25%
    setosa 3.675 4.4 1.0 1.4
    versicolor 3.000 3.4 3.0 4.0
    virginica 3.175 3.8 4.5 5.1
     Petal.Length.50% Petal.Length.75% Petal.Length.100% Petal.Width.0%
    setosa 1.50 1.575 1.9 0.1
    versicolor 4.35 4.600 5.1 1.0
    virginica 5.55 5.875 6.9 1.4
     Petal.Width.25% Petal.Width.50% Petal.Width.75% Petal.Width.100%
    setosa 0.2 0.2 0.3 0.6
    versicolor 1.2 1.3 1.5 1.8
    virginica 1.8 2.0 2.3 2.5
    > BY(m, f, quantile, expand.wide = TRUE, # Return as list of matrices
    + return = "list")
    $Sepal.Length
     0% 25% 50% 75% 100%
    setosa 4.3 4.800 5.0 5.2 5.8
    versicolor 4.9 5.600 5.9 6.3 7.0
    virginica 4.9 6.225 6.5 6.9 7.9
    
    $Sepal.Width
     0% 25% 50% 75% 100%
    setosa 2.3 3.200 3.4 3.675 4.4
    versicolor 2.0 2.525 2.8 3.000 3.4
    virginica 2.2 2.800 3.0 3.175 3.8
    
    $Petal.Length
     0% 25% 50% 75% 100%
    setosa 1.0 1.4 1.50 1.575 1.9
    versicolor 3.0 4.0 4.35 4.600 5.1
    virginica 4.5 5.1 5.55 5.875 6.9
    
    $Petal.Width
     0% 25% 50% 75% 100%
    setosa 0.1 0.2 0.2 0.3 0.6
    versicolor 1.0 1.2 1.3 1.5 1.8
    virginica 1.4 1.8 2.0 2.3 2.5
    
    >
    > ## data.frame method
    > BY(num_vars(iris), f, sum) # Also returns a data.fram
     Sepal.Length Sepal.Width Petal.Length Petal.Width
    setosa 250.3 171.4 73.1 12.3
    versicolor 296.8 138.5 213.0 66.3
    virginica 329.4 148.7 277.6 101.3
    > BY(num_vars(iris), f, sum, return = 2) # Return as matrix.. also works for computations below
     Sepal.Length Sepal.Width Petal.Length Petal.Width
    setosa 250.3 171.4 73.1 12.3
    versicolor 296.8 138.5 213.0 66.3
    virginica 329.4 148.7 277.6 101.3
    > head(BY(num_vars(iris), f, scale))
     Sepal.Length Sepal.Width Petal.Length Petal.Width
    setosa1 0.26667447 0.1899414 -0.3570112 -0.4364923
    setosa2 -0.30071802 -1.1290958 -0.3570112 -0.4364923
    setosa3 -0.86811050 -0.6014810 -0.9328358 -0.4364923
    setosa4 -1.15180675 -0.8652884 0.2188133 -0.4364923
    setosa5 -0.01702177 0.4537488 -0.3570112 -0.4364923
    setosa6 1.11776320 1.2451711 1.3704625 1.4613004
    > head(BY(num_vars(iris), f, scale, use.g.names = FALSE))
     Sepal.Length Sepal.Width Petal.Length Petal.Width
    1 0.26667447 0.1899414 -0.3570112 -0.4364923
    2 -0.30071802 -1.1290958 -0.3570112 -0.4364923
    3 -0.86811050 -0.6014810 -0.9328358 -0.4364923
    4 -1.15180675 -0.8652884 0.2188133 -0.4364923
    5 -0.01702177 0.4537488 -0.3570112 -0.4364923
    6 1.11776320 1.2451711 1.3704625 1.4613004
    > BY(num_vars(iris), f, quantile)
     Sepal.Length Sepal.Width Petal.Length Petal.Width
    setosa.0% 4.300 2.300 1.000 0.1
    setosa.25% 4.800 3.200 1.400 0.2
    setosa.50% 5.000 3.400 1.500 0.2
    setosa.75% 5.200 3.675 1.575 0.3
    setosa.100% 5.800 4.400 1.900 0.6
    versicolor.0% 4.900 2.000 3.000 1.0
    versicolor.25% 5.600 2.525 4.000 1.2
    versicolor.50% 5.900 2.800 4.350 1.3
    versicolor.75% 6.300 3.000 4.600 1.5
    versicolor.100% 7.000 3.400 5.100 1.8
    virginica.0% 4.900 2.200 4.500 1.4
    virginica.25% 6.225 2.800 5.100 1.8
    virginica.50% 6.500 3.000 5.550 2.0
    virginica.75% 6.900 3.175 5.875 2.3
    virginica.100% 7.900 3.800 6.900 2.5
    > BY(num_vars(iris), f, quantile, expand.wide = TRUE)
     Sepal.Length.0% Sepal.Length.25% Sepal.Length.50% Sepal.Length.75%
    setosa 4.3 4.800 5.0 5.2
    versicolor 4.9 5.600 5.9 6.3
    virginica 4.9 6.225 6.5 6.9
     Sepal.Length.100% Sepal.Width.0% Sepal.Width.25% Sepal.Width.50%
    setosa 5.8 2.3 3.200 3.4
    versicolor 7.0 2.0 2.525 2.8
    virginica 7.9 2.2 2.800 3.0
     Sepal.Width.75% Sepal.Width.100% Petal.Length.0% Petal.Length.25%
    setosa 3.675 4.4 1.0 1.4
    versicolor 3.000 3.4 3.0 4.0
    virginica 3.175 3.8 4.5 5.1
     Petal.Length.50% Petal.Length.75% Petal.Length.100% Petal.Width.0%
    setosa 1.50 1.575 1.9 0.1
    versicolor 4.35 4.600 5.1 1.0
    virginica 5.55 5.875 6.9 1.4
     Petal.Width.25% Petal.Width.50% Petal.Width.75% Petal.Width.100%
    setosa 0.2 0.2 0.3 0.6
    versicolor 1.2 1.3 1.5 1.8
    virginica 1.8 2.0 2.3 2.5
    > BY(num_vars(iris), f, quantile, # Return as list of matrices
    + expand.wide = TRUE, return = "list")
    $Sepal.Length
     0% 25% 50% 75% 100%
    setosa 4.3 4.800 5.0 5.2 5.8
    versicolor 4.9 5.600 5.9 6.3 7.0
    virginica 4.9 6.225 6.5 6.9 7.9
    
    $Sepal.Width
     0% 25% 50% 75% 100%
    setosa 2.3 3.200 3.4 3.675 4.4
    versicolor 2.0 2.525 2.8 3.000 3.4
    virginica 2.2 2.800 3.0 3.175 3.8
    
    $Petal.Length
     0% 25% 50% 75% 100%
    setosa 1.0 1.4 1.50 1.575 1.9
    versicolor 3.0 4.0 4.35 4.600 5.1
    virginica 4.5 5.1 5.55 5.875 6.9
    
    $Petal.Width
     0% 25% 50% 75% 100%
    setosa 0.1 0.2 0.2 0.3 0.6
    versicolor 1.0 1.2 1.3 1.5 1.8
    virginica 1.4 1.8 2.0 2.3 2.5
    
    >
    > ## grouped data frame method
    > giris <- fgroup_by(iris, Species)
    > giris |> BY(sum) # Compute sum
    Error: unexpected '>' in "giris |>"
    Execution halted
Flavor: r-oldrel-windows-ix86+x86_64

Version: 1.7.0
Check: for unstated dependencies in ‘tests’
Result: WARN
    Warning: parse error in file 'testthat/test-fmutate.R':
    44:70: unexpected '>'
    43: expect_equal(fsummarise(gmtc, mpg = bmean(mpg), carb = fmax(carb), keep.group_vars = FALSE),
    44: fsummarise(gmtc, mpg = bmean(mpg), carb = fmax(carb)) |>
     ^
    Warning: parse error in file 'testthat/test-sf.R':
    31:28: unexpected '>'
    30: expect_true(length(fcomputev(nc, "AREA", fscale, apply = FALSE, keep = "PERIMETER")) == 3L)
    31: expect_true(inherits(nc |>
     ^
Flavor: r-oldrel-windows-ix86+x86_64

Version: 1.7.0
Check: running tests for arch ‘i386’
Result: ERROR
     Running 'testthat.R' [103s]
    Running the tests in 'tests/testthat.R' failed.
    Complete output:
     > # rm(list = ls())
     > # Sys.setenv("R_TESTS" = "")
     > library(testthat)
     > # library(collapse)
     >
     > test_check("collapse")
     Loading required package: collapse
     collapse 1.7.0, see ?`collapse-package` or ?`collapse-documentation`
    
     Attaching package: 'collapse'
    
     The following object is masked from 'package:stats':
    
     D
    
     Error in parse(con, n = -1, srcfile = srcfile, encoding = "UTF-8") :
     test-fmutate.R:44:70: unexpected '>'
     43: expect_equal(fsummarise(gmtc, mpg = bmean(mpg), carb = fmax(carb), keep.group_vars = FALSE),
     44: fsummarise(gmtc, mpg = bmean(mpg), carb = fmax(carb)) |>
     ^
     Calls: test_check ... doTryCatch -> lapply -> FUN -> source_file -> parse
     Execution halted
Flavor: r-oldrel-windows-ix86+x86_64

Version: 1.7.0
Check: running tests for arch ‘x64’
Result: ERROR
     Running 'testthat.R' [89s]
    Running the tests in 'tests/testthat.R' failed.
    Complete output:
     > # rm(list = ls())
     > # Sys.setenv("R_TESTS" = "")
     > library(testthat)
     > # library(collapse)
     >
     > test_check("collapse")
     Loading required package: collapse
     collapse 1.7.0, see ?`collapse-package` or ?`collapse-documentation`
    
     Attaching package: 'collapse'
    
     The following object is masked from 'package:stats':
    
     D
    
     Error in parse(con, n = -1, srcfile = srcfile, encoding = "UTF-8") :
     test-fmutate.R:44:70: unexpected '>'
     43: expect_equal(fsummarise(gmtc, mpg = bmean(mpg), carb = fmax(carb), keep.group_vars = FALSE),
     44: fsummarise(gmtc, mpg = bmean(mpg), carb = fmax(carb)) |>
     ^
     Calls: test_check ... doTryCatch -> lapply -> FUN -> source_file -> parse
     Execution halted
Flavor: r-oldrel-windows-ix86+x86_64