R Under development (unstable) (2026-08-05 r90355) -- "Unsuffered Consequences" Copyright (C) 2026 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. Natural language support but running in an English locale R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > pkgname <- "bigtabulate" > source(file.path(R.home("share"), "R", "examples-header.R")) > options(warn = 1) > library('bigtabulate') Loading required package: bigmemory Loading required package: biganalytics Loading required package: foreach Loading required package: biglm Loading required package: DBI > > base::assign(".oldSearch", base::search(), pos = 'CheckExEnv') > base::assign(".old_wd", base::getwd(), pos = 'CheckExEnv') > cleanEx() > nameEx("bigtabulate") > ### * bigtabulate > > flush(stderr()); flush(stdout()) > > ### Name: bigtabulate > ### Title: Extended Tabular Operations for Both matrix and big.matrix > ### Objects > ### Aliases: bigtabulate bigsplit bigtable bigtsummary > > ### ** Examples > > data(iris) > > # First, break up column 2 into 5 groups, and leave column 5 as a > # factor (which it is). Note that iris is a data.frame, which is > # fine. A matrix would also be fine. A big.matrix would also be fine! > bigtable(iris, ccols=c(2, 5), breaks=list(5, NA)) 1 2 3 0 1 13 5 1 11 32 32 2 32 5 13 3 5 0 0 4 1 0 0 > > iris[,2] <- round(iris[,2]) # So columns 2 and 5 will be factor-like > # for convenience in these examples, below: > > ans1 <- bigtable(iris, c(2, 5)) > ans1 1 2 3 2 1 13 5 3 27 37 42 4 22 0 3 > # Same answer, but with nice factor labels from table(), because > # table() handles factors. bigtable() uses the numeric factor > # levels only. > table(iris[,2], iris[,5]) setosa versicolor virginica 2 1 13 5 3 27 37 42 4 22 0 3 > > # Here, our formulation is simpler than split's, and is faster and > # more memory-efficient: > ans2 <- bigsplit(iris, c(2, 5), splitcol=1) /usr/local/clang22me/bin/../include/c++/v1/__string/constexpr_c_functions.h:227:25: runtime error: store to misaligned address 0x000000000001 for type 'double *', which requires 8 byte alignment 0x000000000001: note: pointer points here #0 0x7f1ad6ecafc8 in double* std::__1::__constexpr_memmove[abi:nqe220108](double*, double*, std::__1::__element_count) /usr/local/clang22me/bin/../include/c++/v1/__string/constexpr_c_functions.h:227:5 #1 0x7f1ad6ecafc8 in std::__1::pair std::__1::__copy_trivial_impl[abi:nqe220108](double*, double*, double*) /usr/local/clang22me/bin/../include/c++/v1/__algorithm/copy_move_common.h:64:3 #2 0x7f1ad6ecafc8 in std::__1::pair std::__1::__copy_impl::operator()[abi:nqe220108](double*, double*, double*) const /usr/local/clang22me/bin/../include/c++/v1/__algorithm/copy.h:115:12 #3 0x7f1ad6ecafc8 in std::__1::pair, double*> std::__1::__copy_move_unwrap_iters[abi:nqe220108], std::__1::__wrap_iter, double*, 0>(std::__1::__wrap_iter, std::__1::__wrap_iter, double*) /usr/local/clang22me/bin/../include/c++/v1/__algorithm/copy_move_common.h:94:19 #4 0x7f1ad6e77351 in std::__1::pair, double*> std::__1::__copy[abi:nqe220108], std::__1::__wrap_iter, double*>(std::__1::__wrap_iter, std::__1::__wrap_iter, double*) /usr/local/clang22me/bin/../include/c++/v1/__algorithm/copy.h:122:10 #5 0x7f1ad6e77351 in double* std::__1::copy[abi:nqe220108], double*>(std::__1::__wrap_iter, std::__1::__wrap_iter, double*) /usr/local/clang22me/bin/../include/c++/v1/__algorithm/copy.h:128:10 #6 0x7f1ad6e77351 in SEXPREC* TAPPLY>(MatrixAccessor, SEXPREC*, SEXPREC*, SEXPREC*, SEXPREC*, SEXPREC*, SEXPREC*, SEXPREC*, SEXPREC*, SEXPREC*) /data/localhost/ripley/R/packages/tests-clang-UBSAN/bigtabulate/src/bigtabulate.cpp:608:11 #7 0x7f1ad6e7260b in RNumericTAPPLY /data/localhost/ripley/R/packages/tests-clang-UBSAN/bigtabulate/src/bigtabulate.cpp:772:10 #8 0x5611b7f87e4b in R_doDotCall (/data/localhost/ripley/R/R-clang/bin/exec/R+0x90e4b) #9 0x5611b7f8873d in do_dotcall (/data/localhost/ripley/R/R-clang/bin/exec/R+0x9173d) #10 0x5611b7fc7273 in bcEval_loop eval.c #11 0x5611b7fc083b in bcEval eval.c #12 0x5611b7fbfff4 in Rf_eval (/data/localhost/ripley/R/R-clang/bin/exec/R+0xc8ff4) #13 0x5611b7fd8158 in R_execClosure eval.c #14 0x5611b7fd764a in applyClosure_core eval.c #15 0x5611b7fc0f16 in Rf_applyClosure (/data/localhost/ripley/R/R-clang/bin/exec/R+0xc9f16) #16 0x5611b7fc0447 in Rf_eval (/data/localhost/ripley/R/R-clang/bin/exec/R+0xc9447) #17 0x5611b7fdd4b7 in do_set (/data/localhost/ripley/R/R-clang/bin/exec/R+0xe64b7) #18 0x5611b7fc021f in Rf_eval (/data/localhost/ripley/R/R-clang/bin/exec/R+0xc921f) #19 0x5611b800d777 in Rf_ReplIteration (/data/localhost/ripley/R/R-clang/bin/exec/R+0x116777) #20 0x5611b800f27e in run_Rmainloop (/data/localhost/ripley/R/R-clang/bin/exec/R+0x11827e) #21 0x5611b800f2ea in Rf_mainloop (/data/localhost/ripley/R/R-clang/bin/exec/R+0x1182ea) #22 0x5611b7ef8db7 in main (/data/localhost/ripley/R/R-clang/bin/exec/R+0x1db7) #23 0x7f1ade80a680 in __libc_start_call_main (/lib64/libc.so.6+0x3680) (BuildId: 17f2e1fd905f485786f6fd6e3bede4ad737137e7) #24 0x7f1ade80a797 in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x3797) (BuildId: 17f2e1fd905f485786f6fd6e3bede4ad737137e7) #25 0x5611b7ef8cd4 in _start (/data/localhost/ripley/R/R-clang/bin/exec/R+0x1cd4) SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /usr/local/clang22me/bin/../include/c++/v1/__string/constexpr_c_functions.h:227:25 > ans2[1:3] $`2:1` [1] 4.5 $`3:1` [1] 4.9 4.7 4.6 4.6 5.0 4.4 4.9 4.8 4.8 4.3 5.4 5.1 4.8 5.0 5.0 5.2 4.7 4.8 5.4 [20] 4.9 5.0 4.4 5.1 4.4 4.8 4.6 5.0 $`4:1` [1] 5.1 5.0 5.4 5.4 5.8 5.7 5.4 5.1 5.7 5.1 5.1 4.6 5.2 5.2 5.5 5.5 4.9 5.0 5.0 [20] 5.1 5.1 5.3 > split(iris[,1], list(col2=factor(iris[,2]), col5=iris[,5]))[1:3] $`2.setosa` [1] 4.5 $`3.setosa` [1] 4.9 4.7 4.6 4.6 5.0 4.4 4.9 4.8 4.8 4.3 5.4 5.1 4.8 5.0 5.0 5.2 4.7 4.8 5.4 [20] 4.9 5.0 4.4 5.1 4.4 4.8 4.6 5.0 $`4.setosa` [1] 5.1 5.0 5.4 5.4 5.8 5.7 5.4 5.1 5.7 5.1 5.1 4.6 5.2 5.2 5.5 5.5 4.9 5.0 5.0 [20] 5.1 5.1 5.3 > > > > ### *