R Under development (unstable) (2023-12-20 r85711 ucrt) -- "Unsuffered Consequences" Copyright (C) 2023 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 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. 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. > source("incl/start,load-only.R") [13:13:05.810] Detected 'R CMD check': - adjusting defaults to be a good citizen [13:13:05.812] Set package option 'parallelly.availableCores.methods' [13:13:05.812] Environment variable 'R_PARALLELLY_AVAILABLECORES_METHODS' not set [13:13:05.813] Set package option 'parallelly.availableCores.fallback' [13:13:05.813] Environment variable 'R_PARALLELLY_AVAILABLECORES_FALLBACK' not set [13:13:05.813] Set package option 'parallelly.availableCores.min' [13:13:05.814] Environment variable 'R_PARALLELLY_AVAILABLECORES_MIN' not set [13:13:05.814] Set package option 'parallelly.availableCores.system' [13:13:05.814] Environment variable 'R_PARALLELLY_AVAILABLECORES_SYSTEM' not set [13:13:05.814] Set package option 'parallelly.availableCores.logical' [13:13:05.815] Environment variable 'R_PARALLELLY_AVAILABLECORES_LOGICAL' not set [13:13:05.815] Set package option 'parallelly.availableCores.omit' [13:13:05.815] Environment variable 'R_PARALLELLY_AVAILABLECORES_OMIT' not set [13:13:05.816] Set package option 'parallelly.availableWorkers.methods' [13:13:05.816] Environment variable 'R_PARALLELLY_AVAILABLEWORKERS_METHODS' not set [13:13:05.816] Set package option 'parallelly.fork.enable' [13:13:05.816] Environment variable 'R_PARALLELLY_FORK_ENABLE' not set [13:13:05.817] Set package option 'parallelly.supportsMulticore.disableOn' [13:13:05.817] Environment variable 'R_PARALLELLY_SUPPORTSMULTICORE_DISABLEON' not set [13:13:05.817] Set package option 'parallelly.supportsMulticore.unstable' [13:13:05.817] Environment variable 'R_PARALLELLY_SUPPORTSMULTICORE_UNSTABLE' not set [13:13:05.818] Set package option 'parallelly.makeNodePSOCK.setup_strategy' [13:13:05.818] Environment variable 'R_PARALLELLY_MAKENODEPSOCK_SETUP_STRATEGY' not set [13:13:05.818] Set package option 'parallelly.makeNodePSOCK.validate' [13:13:05.819] Environment variable 'R_PARALLELLY_MAKENODEPSOCK_VALIDATE' not set [13:13:05.819] Set package option 'parallelly.makeNodePSOCK.connectTimeout' [13:13:05.819] R_PARALLELLY_MAKENODEPSOCK_CONNECTTIMEOUT='120' [13:13:05.819] Coercing from character to numeric: '120' [13:13:05.820] => options("parallelly.makeNodePSOCK.connectTimeout" = '120') [n=1, mode=double] [13:13:05.820] Set package option 'parallelly.makeNodePSOCK.timeout' [13:13:05.820] R_PARALLELLY_MAKENODEPSOCK_TIMEOUT='120' [13:13:05.821] Coercing from character to numeric: '120' [13:13:05.821] => options("parallelly.makeNodePSOCK.timeout" = '120') [n=1, mode=double] [13:13:05.821] Set package option 'parallelly.makeNodePSOCK.useXDR' [13:13:05.821] Environment variable 'R_PARALLELLY_MAKENODEPSOCK_USEXDR' not set [13:13:05.822] Set package option 'parallelly.makeNodePSOCK.socketOptions' [13:13:05.822] Environment variable 'R_PARALLELLY_MAKENODEPSOCK_SOCKETOPTIONS' not set [13:13:05.822] Set package option 'parallelly.makeNodePSOCK.rshcmd' [13:13:05.822] Environment variable 'R_PARALLELLY_MAKENODEPSOCK_RSHCMD' not set [13:13:05.823] Set package option 'parallelly.makeNodePSOCK.rshopts' [13:13:05.823] Environment variable 'R_PARALLELLY_MAKENODEPSOCK_RSHOPTS' not set [13:13:05.823] Set package option 'parallelly.makeNodePSOCK.tries' [13:13:05.824] Environment variable 'R_PARALLELLY_MAKENODEPSOCK_TRIES' not set [13:13:05.824] Set package option 'parallelly.makeNodePSOCK.tries.delay' [13:13:05.824] Environment variable 'R_PARALLELLY_MAKENODEPSOCK_TRIES_DELAY' not set [13:13:05.824] Set package option 'parallelly.makeNodePSOCK.rscript_label' [13:13:05.825] R_PARALLELLY_MAKENODEPSOCK_RSCRIPT_LABEL='TRUE' [13:13:05.825] => options("parallelly.makeNodePSOCK.rscript_label" = 'TRUE') [n=1, mode=character] [13:13:05.825] Set package option 'parallelly.makeNodePSOCK.sessionInfo.pkgs' [13:13:05.825] R_PARALLELLY_MAKENODEPSOCK_SESSIONINFO_PKGS='TRUE' [13:13:05.826] => options("parallelly.makeNodePSOCK.sessionInfo.pkgs" = 'TRUE') [n=1, mode=character] [13:13:05.826] Set package option 'parallelly.makeNodePSOCK.autoKill' [13:13:05.826] R_PARALLELLY_MAKENODEPSOCK_AUTOKILL='TRUE' [13:13:05.826] Coercing from character to logical: 'TRUE' [13:13:05.827] => options("parallelly.makeNodePSOCK.autoKill" = 'TRUE') [n=1, mode=logical] [13:13:05.827] Set package option 'parallelly.makeNodePSOCK.master.localhost.hostname' [13:13:05.827] Environment variable 'R_PARALLELLY_MAKENODEPSOCK_MASTER_LOCALHOST_HOSTNAME' not set [13:13:05.827] Set package option 'parallelly.makeNodePSOCK.port.increment' [13:13:05.828] Environment variable 'R_PARALLELLY_MAKENODEPSOCK_PORT_INCREMENT' not set [13:13:05.829] parallelly-specific environment variables: - R_PARALLELLY_MAKENODEPSOCK_AUTOKILL='TRUE' - R_PARALLELLY_MAKENODEPSOCK_CONNECTTIMEOUT='120' - R_PARALLELLY_MAKENODEPSOCK_RSCRIPT_LABEL='TRUE' - R_PARALLELLY_MAKENODEPSOCK_SESSIONINFO_PKGS='TRUE' - R_PARALLELLY_MAKENODEPSOCK_TIMEOUT='120' - R_PARALLELLY_RANDOM_PORTS='20000:39999' [13:13:05.837] Future-specific environment variables: [13:13:05.837] Environment variable 'R_FUTURE_DEMO_MANDELBROT_REGION' not set [13:13:05.838] Environment variable 'R_FUTURE_DEMO_MANDELBROT_NROW' not set [13:13:05.838] Environment variable 'R_FUTURE_DEPRECATED_IGNORE' not set [13:13:05.838] Environment variable 'R_FUTURE_DEPRECATED_DEFUNCT' not set [13:13:05.838] Environment variable 'R_FUTURE_FORK_MULTITHREADING_ENABLE' not set [13:13:05.838] Environment variable 'R_FUTURE_GLOBALS_MAXSIZE' not set [13:13:05.839] Environment variable 'R_FUTURE_GLOBALS_ONMISSING' not set [13:13:05.839] Environment variable 'R_FUTURE_GLOBALS_ONREFERENCE' not set [13:13:05.839] Environment variable 'R_FUTURE_GLOBALS_METHOD' not set [13:13:05.839] Environment variable 'R_FUTURE_GLOBALS_RESOLVE' not set [13:13:05.839] Environment variable 'R_FUTURE_LAZY_ASSERTOWNER' not set [13:13:05.840] Environment variable 'R_FUTURE_PLAN' not set [13:13:05.840] Environment variable 'R_FUTURE_PLAN_DISALLOW' not set [13:13:05.840] Environment variable 'R_FUTURE_PSOCK_RELAY_IMMEDIATE' not set [13:13:05.840] Environment variable 'R_FUTURE_RELAY_IMMEDIATE' not set [13:13:05.840] Environment variable 'R_FUTURE_RESOLVE_RECURSIVE' not set [13:13:05.840] Environment variable 'R_FUTURE_ALIVE_TIMEOUT' not set [13:13:05.841] Environment variable 'R_FUTURE_RESOLVED_TIMEOUT' not set [13:13:05.841] Environment variable 'R_FUTURE_CLUSTER_RESOLVED_TIMEOUT' not set [13:13:05.841] Environment variable 'R_FUTURE_MULTICORE_RESOLVED_TIMEOUT' not set [13:13:05.841] Environment variable 'R_FUTURE_ONFUTURECONDITION_KEEPFUTURE' not set [13:13:05.841] Environment variable 'R_FUTURE_RNG_ONMISUSE' not set [13:13:05.842] Environment variable 'R_FUTURE_GLOBALENV_ONMISUSE' not set [13:13:05.842] Environment variable 'R_FUTURE_WAIT_TIMEOUT' not set [13:13:05.842] Environment variable 'R_FUTURE_WAIT_INTERVAL' not set [13:13:05.842] Environment variable 'R_FUTURE_WAIT_ALPHA' not set [13:13:05.842] Environment variable 'R_FUTURE_ASSIGN_GLOBALS_EXCLUDE' not set [13:13:05.843] Environment variable 'R_FUTURE_OUTPUT_WINDOWS_REENCODE' not set [13:13:05.843] Environment variable 'R_FUTURE_GLOBALS_GLOBALSOF_LOCALS' not set [13:13:05.843] Environment variable 'R_FUTURE_STATE_ONINVALID' not set [13:13:05.843] Environment variable 'R_FUTURE_JOURNAL' not set [13:13:05.843] Environment variable 'R_FUTURE_GLOBALS_KEEPWHERE' not set [13:13:05.844] R process uuid: 9a2a375d-f08e-73ba-907b-d12b0973baab [13:13:05.845] Setting plan('default') [13:13:05.845] plan(): Setting new future strategy stack: [13:13:05.846] List of future strategies: [13:13:05.846] 1. sequential: [13:13:05.846] - args: function (..., envir = parent.frame(), workers = "") [13:13:05.846] - tweaked: FALSE [13:13:05.846] - call: NULL [13:13:05.847] plan(): nbrOfWorkers() = 1 [13:13:05.874] plan(): Setting new future strategy stack: [13:13:05.874] List of future strategies: [13:13:05.874] 1. sequential: [13:13:05.874] - args: function (..., envir = parent.frame(), workers = "") [13:13:05.874] - tweaked: FALSE [13:13:05.874] - call: future::plan("sequential") [13:13:05.886] plan(): nbrOfWorkers() = 1 > > message("*** fold() ...") *** fold() ... > > x1s <- list( + a = NULL, + b = 1, + c = c(a = 1, b = 2), + d = 1:10e3 + ) > > x2s <- lapply(x1s, FUN = as.list) > names(x2s) <- toupper(names(x1s)) > > x3s <- list( + E = data.frame(a = 1:3), + F = data.frame(a = 1:3, b = letters[1:3], stringsAsFactors=FALSE) + ) > > xs <- c(x1s, x2s, x3s) > > > fcns <- list("c" = base::c, "cbind" = base::cbind) > for (kk in seq_along(xs)) { + x_name <- names(xs)[kk] + for (fcn_name in names(fcns)) { + fcn <- fcns[[fcn_name]] + message(sprintf(" - #%d. %s(x[['%s']]) ...", kk, fcn_name, x_name)) + x <- xs[[kk]] + str(list(x = x)) + + y0 <- Reduce(x, f = fcn) + y1 <- fold(x, f = fcn) + y2 <- fold(x, f = fcn, unname = FALSE) + str(list(y0 = y0, y1 = y1, y2 = y2)) + stopifnot(all.equal(unname(y1), unname(y0))) + stopifnot(all.equal(unname(y2), unname(y0))) + if (!fcn_name %in% "cbind") { + stopifnot(all.equal(y1, y0)) + stopifnot(all.equal(y2, y0)) + } + + y0 <- Reduce(x, f = fcn, right = TRUE) + y1 <- fold(x, f = fcn, left = FALSE) + y2 <- fold(x, f = fcn, left = FALSE, unname = FALSE) + str(list(y0 = y0, y1 = y1, y2 = y2)) + stopifnot(all.equal(unname(y1), unname(y0))) + stopifnot(all.equal(unname(y2), unname(y0))) + if (!fcn_name %in% "cbind") { + stopifnot(all.equal(y1, y0)) + stopifnot(all.equal(y2, y0)) + } + + message(sprintf(" - #%d. %s(x[['%s']]) ... DONE", kk, fcn_name, x_name)) + } + } - #1. c(x[['a']]) ... List of 1 $ x: NULL List of 3 $ y0: NULL $ y1: NULL $ y2: NULL List of 3 $ y0: NULL $ y1: NULL $ y2: NULL - #1. c(x[['a']]) ... DONE - #1. cbind(x[['a']]) ... List of 1 $ x: NULL List of 3 $ y0: NULL $ y1: NULL $ y2: NULL List of 3 $ y0: NULL $ y1: NULL $ y2: NULL - #1. cbind(x[['a']]) ... DONE - #2. c(x[['b']]) ... List of 1 $ x: num 1 List of 3 $ y0: num 1 $ y1: num 1 $ y2: num 1 List of 3 $ y0: num 1 $ y1: num 1 $ y2: num 1 - #2. c(x[['b']]) ... DONE - #2. cbind(x[['b']]) ... List of 1 $ x: num 1 List of 3 $ y0: num 1 $ y1: num 1 $ y2: num 1 List of 3 $ y0: num 1 $ y1: num 1 $ y2: num 1 - #2. cbind(x[['b']]) ... DONE - #3. c(x[['c']]) ... List of 1 $ x: Named num [1:2] 1 2 ..- attr(*, "names")= chr [1:2] "a" "b" List of 3 $ y0: num [1:2] 1 2 $ y1: num [1:2] 1 2 $ y2: num [1:2] 1 2 List of 3 $ y0: num [1:2] 1 2 $ y1: num [1:2] 1 2 $ y2: num [1:2] 1 2 - #3. c(x[['c']]) ... DONE - #3. cbind(x[['c']]) ... List of 1 $ x: Named num [1:2] 1 2 ..- attr(*, "names")= chr [1:2] "a" "b" List of 3 $ y0: num [1, 1:2] 1 2 ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:2] "init" "" $ y1: num [1, 1:2] 1 2 $ y2: num [1, 1:2] 1 2 ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:2] "y" "" List of 3 $ y0: num [1, 1:2] 1 2 ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:2] "" "init" $ y1: num [1, 1:2] 1 2 $ y2: num [1, 1:2] 1 2 ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:2] "" "y" - #3. cbind(x[['c']]) ... DONE - #4. c(x[['d']]) ... List of 1 $ x: int [1:10000] 1 2 3 4 5 6 7 8 9 10 ... List of 3 $ y0: int [1:10000] 1 2 3 4 5 6 7 8 9 10 ... $ y1: int [1:10000] 1 2 3 4 5 6 7 8 9 10 ... $ y2: int [1:10000] 1 2 3 4 5 6 7 8 9 10 ... List of 3 $ y0: int [1:10000] 1 2 3 4 5 6 7 8 9 10 ... $ y1: int [1:10000] 1 2 3 4 5 6 7 8 9 10 ... $ y2: int [1:10000] 1 2 3 4 5 6 7 8 9 10 ... - #4. c(x[['d']]) ... DONE - #4. cbind(x[['d']]) ... List of 1 $ x: int [1:10000] 1 2 3 4 5 6 7 8 9 10 ... List of 3 $ y0: int [1, 1:10000] 1 2 3 4 5 6 7 8 9 10 ... ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:10000] "init" "" "" "" ... $ y1: int [1, 1:10000] 1 2 3 4 5 6 7 8 9 10 ... $ y2: int [1, 1:10000] 1 2 3 4 5 6 7 8 9 10 ... ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:10000] "y" "" "" "" ... List of 3 $ y0: int [1, 1:10000] 1 2 3 4 5 6 7 8 9 10 ... ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:10000] "" "" "" "" ... $ y1: int [1, 1:10000] 1 2 3 4 5 6 7 8 9 10 ... $ y2: int [1, 1:10000] 1 2 3 4 5 6 7 8 9 10 ... ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:10000] "" "" "" "" ... - #4. cbind(x[['d']]) ... DONE - #5. c(x[['A']]) ... List of 1 $ x: list() List of 3 $ y0: NULL $ y1: NULL $ y2: NULL List of 3 $ y0: NULL $ y1: NULL $ y2: NULL - #5. c(x[['A']]) ... DONE - #5. cbind(x[['A']]) ... List of 1 $ x: list() List of 3 $ y0: NULL $ y1: NULL $ y2: NULL List of 3 $ y0: NULL $ y1: NULL $ y2: NULL - #5. cbind(x[['A']]) ... DONE - #6. c(x[['B']]) ... List of 1 $ x:List of 1 ..$ : num 1 List of 3 $ y0: num 1 $ y1: num 1 $ y2: num 1 List of 3 $ y0: num 1 $ y1: num 1 $ y2: num 1 - #6. c(x[['B']]) ... DONE - #6. cbind(x[['B']]) ... List of 1 $ x:List of 1 ..$ : num 1 List of 3 $ y0: num 1 $ y1: num 1 $ y2: num 1 List of 3 $ y0: num 1 $ y1: num 1 $ y2: num 1 - #6. cbind(x[['B']]) ... DONE - #7. c(x[['C']]) ... List of 1 $ x:List of 2 ..$ a: num 1 ..$ b: num 2 List of 3 $ y0: num [1:2] 1 2 $ y1: num [1:2] 1 2 $ y2: num [1:2] 1 2 List of 3 $ y0: num [1:2] 1 2 $ y1: num [1:2] 1 2 $ y2: num [1:2] 1 2 - #7. c(x[['C']]) ... DONE - #7. cbind(x[['C']]) ... List of 1 $ x:List of 2 ..$ a: num 1 ..$ b: num 2 List of 3 $ y0: num [1, 1:2] 1 2 ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:2] "init" "" $ y1: num [1, 1:2] 1 2 $ y2: num [1, 1:2] 1 2 ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:2] "y" "" List of 3 $ y0: num [1, 1:2] 1 2 ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:2] "" "init" $ y1: num [1, 1:2] 1 2 $ y2: num [1, 1:2] 1 2 ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:2] "" "y" - #7. cbind(x[['C']]) ... DONE - #8. c(x[['D']]) ... List of 1 $ x:List of 10000 ..$ : int 1 ..$ : int 2 ..$ : int 3 ..$ : int 4 ..$ : int 5 ..$ : int 6 ..$ : int 7 ..$ : int 8 ..$ : int 9 ..$ : int 10 ..$ : int 11 ..$ : int 12 ..$ : int 13 ..$ : int 14 ..$ : int 15 ..$ : int 16 ..$ : int 17 ..$ : int 18 ..$ : int 19 ..$ : int 20 ..$ : int 21 ..$ : int 22 ..$ : int 23 ..$ : int 24 ..$ : int 25 ..$ : int 26 ..$ : int 27 ..$ : int 28 ..$ : int 29 ..$ : int 30 ..$ : int 31 ..$ : int 32 ..$ : int 33 ..$ : int 34 ..$ : int 35 ..$ : int 36 ..$ : int 37 ..$ : int 38 ..$ : int 39 ..$ : int 40 ..$ : int 41 ..$ : int 42 ..$ : int 43 ..$ : int 44 ..$ : int 45 ..$ : int 46 ..$ : int 47 ..$ : int 48 ..$ : int 49 ..$ : int 50 ..$ : int 51 ..$ : int 52 ..$ : int 53 ..$ : int 54 ..$ : int 55 ..$ : int 56 ..$ : int 57 ..$ : int 58 ..$ : int 59 ..$ : int 60 ..$ : int 61 ..$ : int 62 ..$ : int 63 ..$ : int 64 ..$ : int 65 ..$ : int 66 ..$ : int 67 ..$ : int 68 ..$ : int 69 ..$ : int 70 ..$ : int 71 ..$ : int 72 ..$ : int 73 ..$ : int 74 ..$ : int 75 ..$ : int 76 ..$ : int 77 ..$ : int 78 ..$ : int 79 ..$ : int 80 ..$ : int 81 ..$ : int 82 ..$ : int 83 ..$ : int 84 ..$ : int 85 ..$ : int 86 ..$ : int 87 ..$ : int 88 ..$ : int 89 ..$ : int 90 ..$ : int 91 ..$ : int 92 ..$ : int 93 ..$ : int 94 ..$ : int 95 ..$ : int 96 ..$ : int 97 ..$ : int 98 ..$ : int 99 .. [list output truncated] List of 3 $ y0: int [1:10000] 1 2 3 4 5 6 7 8 9 10 ... $ y1: int [1:10000] 1 2 3 4 5 6 7 8 9 10 ... $ y2: int [1:10000] 1 2 3 4 5 6 7 8 9 10 ... List of 3 $ y0: int [1:10000] 1 2 3 4 5 6 7 8 9 10 ... $ y1: int [1:10000] 1 2 3 4 5 6 7 8 9 10 ... $ y2: int [1:10000] 1 2 3 4 5 6 7 8 9 10 ... - #8. c(x[['D']]) ... DONE - #8. cbind(x[['D']]) ... List of 1 $ x:List of 10000 ..$ : int 1 ..$ : int 2 ..$ : int 3 ..$ : int 4 ..$ : int 5 ..$ : int 6 ..$ : int 7 ..$ : int 8 ..$ : int 9 ..$ : int 10 ..$ : int 11 ..$ : int 12 ..$ : int 13 ..$ : int 14 ..$ : int 15 ..$ : int 16 ..$ : int 17 ..$ : int 18 ..$ : int 19 ..$ : int 20 ..$ : int 21 ..$ : int 22 ..$ : int 23 ..$ : int 24 ..$ : int 25 ..$ : int 26 ..$ : int 27 ..$ : int 28 ..$ : int 29 ..$ : int 30 ..$ : int 31 ..$ : int 32 ..$ : int 33 ..$ : int 34 ..$ : int 35 ..$ : int 36 ..$ : int 37 ..$ : int 38 ..$ : int 39 ..$ : int 40 ..$ : int 41 ..$ : int 42 ..$ : int 43 ..$ : int 44 ..$ : int 45 ..$ : int 46 ..$ : int 47 ..$ : int 48 ..$ : int 49 ..$ : int 50 ..$ : int 51 ..$ : int 52 ..$ : int 53 ..$ : int 54 ..$ : int 55 ..$ : int 56 ..$ : int 57 ..$ : int 58 ..$ : int 59 ..$ : int 60 ..$ : int 61 ..$ : int 62 ..$ : int 63 ..$ : int 64 ..$ : int 65 ..$ : int 66 ..$ : int 67 ..$ : int 68 ..$ : int 69 ..$ : int 70 ..$ : int 71 ..$ : int 72 ..$ : int 73 ..$ : int 74 ..$ : int 75 ..$ : int 76 ..$ : int 77 ..$ : int 78 ..$ : int 79 ..$ : int 80 ..$ : int 81 ..$ : int 82 ..$ : int 83 ..$ : int 84 ..$ : int 85 ..$ : int 86 ..$ : int 87 ..$ : int 88 ..$ : int 89 ..$ : int 90 ..$ : int 91 ..$ : int 92 ..$ : int 93 ..$ : int 94 ..$ : int 95 ..$ : int 96 ..$ : int 97 ..$ : int 98 ..$ : int 99 .. [list output truncated] List of 3 $ y0: int [1, 1:10000] 1 2 3 4 5 6 7 8 9 10 ... ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:10000] "init" "" "" "" ... $ y1: int [1, 1:10000] 1 2 3 4 5 6 7 8 9 10 ... $ y2: int [1, 1:10000] 1 2 3 4 5 6 7 8 9 10 ... ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:10000] "y" "" "" "" ... List of 3 $ y0: int [1, 1:10000] 1 2 3 4 5 6 7 8 9 10 ... ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:10000] "" "" "" "" ... $ y1: int [1, 1:10000] 1 2 3 4 5 6 7 8 9 10 ... $ y2: int [1, 1:10000] 1 2 3 4 5 6 7 8 9 10 ... ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:10000] "" "" "" "" ... - #8. cbind(x[['D']]) ... DONE - #9. c(x[['E']]) ... List of 1 $ x:'data.frame': 3 obs. of 1 variable: ..$ a: int [1:3] 1 2 3 List of 3 $ y0: int [1:3] 1 2 3 $ y1: int [1:3] 1 2 3 $ y2: int [1:3] 1 2 3 List of 3 $ y0: int [1:3] 1 2 3 $ y1: int [1:3] 1 2 3 $ y2: int [1:3] 1 2 3 - #9. c(x[['E']]) ... DONE - #9. cbind(x[['E']]) ... List of 1 $ x:'data.frame': 3 obs. of 1 variable: ..$ a: int [1:3] 1 2 3 List of 3 $ y0: int [1:3] 1 2 3 $ y1: int [1:3] 1 2 3 $ y2: int [1:3] 1 2 3 List of 3 $ y0: int [1:3] 1 2 3 $ y1: int [1:3] 1 2 3 $ y2: int [1:3] 1 2 3 - #9. cbind(x[['E']]) ... DONE - #10. c(x[['F']]) ... List of 1 $ x:'data.frame': 3 obs. of 2 variables: ..$ a: int [1:3] 1 2 3 ..$ b: chr [1:3] "a" "b" "c" List of 3 $ y0: chr [1:6] "1" "2" "3" "a" ... $ y1: chr [1:6] "1" "2" "3" "a" ... $ y2: chr [1:6] "1" "2" "3" "a" ... List of 3 $ y0: chr [1:6] "1" "2" "3" "a" ... $ y1: chr [1:6] "1" "2" "3" "a" ... $ y2: chr [1:6] "1" "2" "3" "a" ... - #10. c(x[['F']]) ... DONE - #10. cbind(x[['F']]) ... List of 1 $ x:'data.frame': 3 obs. of 2 variables: ..$ a: int [1:3] 1 2 3 ..$ b: chr [1:3] "a" "b" "c" List of 3 $ y0: chr [1:3, 1:2] "1" "2" "3" "a" ... ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:2] "init" "" $ y1: chr [1:3, 1:2] "1" "2" "3" "a" ... $ y2: chr [1:3, 1:2] "1" "2" "3" "a" ... ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:2] "y" "" List of 3 $ y0: chr [1:3, 1:2] "1" "2" "3" "a" ... ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:2] "" "init" $ y1: chr [1:3, 1:2] "1" "2" "3" "a" ... $ y2: chr [1:3, 1:2] "1" "2" "3" "a" ... ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:2] "" "y" - #10. cbind(x[['F']]) ... DONE > > > make_table <- function(n) { + data.frame(key = sample(n), value = sample(n), stringsAsFactors=FALSE) + } > > sizes <- rep(10, 20) > > set.seed(3180) > tables <- lapply(sizes, make_table) > > key_merge <- function(x, y) merge(x, y, by = "key", all = FALSE) > > suppressWarnings( + folded <- fold(tables, key_merge, left = TRUE, unname = FALSE, + threshold = 6L) + ) > > suppressWarnings( + reduced <- Reduce(key_merge, tables[-1], tables[[1]]) + ) > > stopifnot(all.equal(unname(folded), unname(reduced))) > > message("*** fold() ... DONE") *** fold() ... DONE > > source("incl/end.R") [13:13:09.993] plan(): Setting new future strategy stack: [13:13:09.993] List of future strategies: [13:13:09.993] 1. FutureStrategy: [13:13:09.993] - args: function (..., envir = parent.frame(), workers = "") [13:13:09.993] - tweaked: FALSE [13:13:09.993] - call: future::plan(oplan) [13:13:10.006] plan(): nbrOfWorkers() = 1 > > proc.time() user system elapsed 3.12 1.29 4.40