R Under development (unstable) (2024-10-26 r87273 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 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") [18:40:41.775] Detected 'R CMD check': - adjusting defaults to be a good citizen [18:40:41.778] Set package option 'parallelly.availableCores.methods' [18:40:41.779] Environment variable 'R_PARALLELLY_AVAILABLECORES_METHODS' not set [18:40:41.779] Set package option 'parallelly.availableCores.fallback' [18:40:41.780] Environment variable 'R_PARALLELLY_AVAILABLECORES_FALLBACK' not set [18:40:41.780] Set package option 'parallelly.availableCores.min' [18:40:41.781] Environment variable 'R_PARALLELLY_AVAILABLECORES_MIN' not set [18:40:41.781] Set package option 'parallelly.availableCores.system' [18:40:41.782] Environment variable 'R_PARALLELLY_AVAILABLECORES_SYSTEM' not set [18:40:41.782] Set package option 'parallelly.availableCores.logical' [18:40:41.783] Environment variable 'R_PARALLELLY_AVAILABLECORES_LOGICAL' not set [18:40:41.783] Set package option 'parallelly.availableCores.omit' [18:40:41.783] Environment variable 'R_PARALLELLY_AVAILABLECORES_OMIT' not set [18:40:41.784] Set package option 'parallelly.availableWorkers.methods' [18:40:41.784] Environment variable 'R_PARALLELLY_AVAILABLEWORKERS_METHODS' not set [18:40:41.785] Set package option 'parallelly.maxWorkers.localhost' [18:40:41.785] Environment variable 'R_PARALLELLY_MAXWORKERS_LOCALHOST' not set [18:40:41.786] Set package option 'parallelly.maxWorkers.localhost.ignore' [18:40:41.786] Environment variable 'R_PARALLELLY_MAXWORKERS_LOCALHOST_IGNORE' not set [18:40:41.786] Set package option 'parallelly.fork.enable' [18:40:41.787] Environment variable 'R_PARALLELLY_FORK_ENABLE' not set [18:40:41.787] Set package option 'parallelly.supportsMulticore.disableOn' [18:40:41.788] Environment variable 'R_PARALLELLY_SUPPORTSMULTICORE_DISABLEON' not set [18:40:41.788] Set package option 'parallelly.supportsMulticore.unstable' [18:40:41.789] Environment variable 'R_PARALLELLY_SUPPORTSMULTICORE_UNSTABLE' not set [18:40:41.789] Set package option 'parallelly.makeNodePSOCK.setup_strategy' [18:40:41.789] Environment variable 'R_PARALLELLY_MAKENODEPSOCK_SETUP_STRATEGY' not set [18:40:41.790] Set package option 'parallelly.makeNodePSOCK.validate' [18:40:41.790] Environment variable 'R_PARALLELLY_MAKENODEPSOCK_VALIDATE' not set [18:40:41.791] Set package option 'parallelly.makeNodePSOCK.connectTimeout' [18:40:41.791] R_PARALLELLY_MAKENODEPSOCK_CONNECTTIMEOUT='120' [18:40:41.792] Coercing from character to numeric: '120' [18:40:41.792] => options("parallelly.makeNodePSOCK.connectTimeout" = '120') [n=1, mode=double] [18:40:41.792] Set package option 'parallelly.makeNodePSOCK.timeout' [18:40:41.793] R_PARALLELLY_MAKENODEPSOCK_TIMEOUT='120' [18:40:41.793] Coercing from character to numeric: '120' [18:40:41.794] => options("parallelly.makeNodePSOCK.timeout" = '120') [n=1, mode=double] [18:40:41.794] Set package option 'parallelly.makeNodePSOCK.useXDR' [18:40:41.795] Environment variable 'R_PARALLELLY_MAKENODEPSOCK_USEXDR' not set [18:40:41.795] Set package option 'parallelly.makeNodePSOCK.socketOptions' [18:40:41.796] Environment variable 'R_PARALLELLY_MAKENODEPSOCK_SOCKETOPTIONS' not set [18:40:41.796] Set package option 'parallelly.makeNodePSOCK.rshcmd' [18:40:41.796] Environment variable 'R_PARALLELLY_MAKENODEPSOCK_RSHCMD' not set [18:40:41.797] Set package option 'parallelly.makeNodePSOCK.rshopts' [18:40:41.797] Environment variable 'R_PARALLELLY_MAKENODEPSOCK_RSHOPTS' not set [18:40:41.798] Set package option 'parallelly.makeNodePSOCK.tries' [18:40:41.798] Environment variable 'R_PARALLELLY_MAKENODEPSOCK_TRIES' not set [18:40:41.799] Set package option 'parallelly.makeNodePSOCK.tries.delay' [18:40:41.799] Environment variable 'R_PARALLELLY_MAKENODEPSOCK_TRIES_DELAY' not set [18:40:41.800] Set package option 'parallelly.makeNodePSOCK.rscript_label' [18:40:41.800] R_PARALLELLY_MAKENODEPSOCK_RSCRIPT_LABEL='TRUE' [18:40:41.800] => options("parallelly.makeNodePSOCK.rscript_label" = 'TRUE') [n=1, mode=character] [18:40:41.801] Set package option 'parallelly.makeNodePSOCK.sessionInfo.pkgs' [18:40:41.801] R_PARALLELLY_MAKENODEPSOCK_SESSIONINFO_PKGS='TRUE' [18:40:41.802] => options("parallelly.makeNodePSOCK.sessionInfo.pkgs" = 'TRUE') [n=1, mode=character] [18:40:41.802] Set package option 'parallelly.makeNodePSOCK.autoKill' [18:40:41.802] R_PARALLELLY_MAKENODEPSOCK_AUTOKILL='TRUE' [18:40:41.803] Coercing from character to logical: 'TRUE' [18:40:41.803] => options("parallelly.makeNodePSOCK.autoKill" = 'TRUE') [n=1, mode=logical] [18:40:41.803] Set package option 'parallelly.makeNodePSOCK.master.localhost.hostname' [18:40:41.804] Environment variable 'R_PARALLELLY_MAKENODEPSOCK_MASTER_LOCALHOST_HOSTNAME' not set [18:40:41.804] Set package option 'parallelly.makeNodePSOCK.port.increment' [18:40:41.805] Environment variable 'R_PARALLELLY_MAKENODEPSOCK_PORT_INCREMENT' not set [18:40:41.806] 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' [18:40:41.822] Future-specific environment variables: [18:40:41.822] Environment variable 'R_FUTURE_DEMO_MANDELBROT_REGION' not set [18:40:41.822] Environment variable 'R_FUTURE_DEMO_MANDELBROT_NROW' not set [18:40:41.823] Environment variable 'R_FUTURE_DEPRECATED_IGNORE' not set [18:40:41.823] Environment variable 'R_FUTURE_DEPRECATED_DEFUNCT' not set [18:40:41.823] Environment variable 'R_FUTURE_FORK_MULTITHREADING_ENABLE' not set [18:40:41.824] Environment variable 'R_FUTURE_GLOBALS_MAXSIZE' not set [18:40:41.824] Environment variable 'R_FUTURE_GLOBALS_ONMISSING' not set [18:40:41.824] Environment variable 'R_FUTURE_GLOBALS_ONREFERENCE' not set [18:40:41.825] Environment variable 'R_FUTURE_GLOBALS_METHOD' not set [18:40:41.825] Environment variable 'R_FUTURE_GLOBALS_RESOLVE' not set [18:40:41.825] Environment variable 'R_FUTURE_LAZY_ASSERTOWNER' not set [18:40:41.825] Environment variable 'R_FUTURE_PLAN' not set [18:40:41.826] Environment variable 'R_FUTURE_PLAN_DISALLOW' not set [18:40:41.826] Environment variable 'R_FUTURE_PSOCK_RELAY_IMMEDIATE' not set [18:40:41.826] Environment variable 'R_FUTURE_RELAY_IMMEDIATE' not set [18:40:41.827] Environment variable 'R_FUTURE_RESOLVE_RECURSIVE' not set [18:40:41.827] Environment variable 'R_FUTURE_ALIVE_TIMEOUT' not set [18:40:41.827] Environment variable 'R_FUTURE_RESOLVED_TIMEOUT' not set [18:40:41.827] Environment variable 'R_FUTURE_CLUSTER_RESOLVED_TIMEOUT' not set [18:40:41.828] Environment variable 'R_FUTURE_MULTICORE_RESOLVED_TIMEOUT' not set [18:40:41.828] Environment variable 'R_FUTURE_ONFUTURECONDITION_KEEPFUTURE' not set [18:40:41.828] Environment variable 'R_FUTURE_RNG_ONMISUSE' not set [18:40:41.829] Environment variable 'R_FUTURE_GLOBALENV_ONMISUSE' not set [18:40:41.829] Environment variable 'R_FUTURE_WAIT_TIMEOUT' not set [18:40:41.829] Environment variable 'R_FUTURE_WAIT_INTERVAL' not set [18:40:41.830] Environment variable 'R_FUTURE_WAIT_ALPHA' not set [18:40:41.830] Environment variable 'R_FUTURE_ASSIGN_GLOBALS_EXCLUDE' not set [18:40:41.830] Environment variable 'R_FUTURE_OUTPUT_WINDOWS_REENCODE' not set [18:40:41.830] Environment variable 'R_FUTURE_GLOBALS_GLOBALSOF_LOCALS' not set [18:40:41.831] Environment variable 'R_FUTURE_STATE_ONINVALID' not set [18:40:41.831] Environment variable 'R_FUTURE_JOURNAL' not set [18:40:41.831] Environment variable 'R_FUTURE_GLOBALS_KEEPWHERE' not set [18:40:41.832] Environment variable 'R_FUTURE_GLOBALS_OBJECTSIZE_METHOD' not set [18:40:41.832] Environment variable 'R_FUTURE_PLAN_CLEANUP_LEGACY' not set [18:40:41.834] R process uuid: f141a0f1-6ee6-754e-082a-041032a02a02 [18:40:41.834] Setting plan('default') [18:40:41.835] plan(): Setting new future strategy stack: [18:40:41.836] List of future strategies: [18:40:41.836] 1. sequential: [18:40:41.836] - args: function (..., envir = parent.frame(), workers = "") [18:40:41.836] - tweaked: FALSE [18:40:41.836] - call: NULL [18:40:41.837] plan(): nbrOfWorkers() = 1 [18:40:41.881] plan(): Setting new future strategy stack: [18:40:41.881] List of future strategies: [18:40:41.881] 1. sequential: [18:40:41.881] - args: function (..., envir = parent.frame(), workers = "") [18:40:41.881] - tweaked: FALSE [18:40:41.881] - call: future::plan("sequential") [18:40:41.901] 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") [18:40:46.486] plan(): Setting new future strategy stack: [18:40:46.486] List of future strategies: [18:40:46.486] 1. FutureStrategy: [18:40:46.486] - args: function (..., envir = parent.frame(), workers = "") [18:40:46.486] - tweaked: FALSE [18:40:46.486] - call: future::plan(oplan) [18:40:46.501] plan(): nbrOfWorkers() = 1 > > proc.time() user system elapsed 3.60 1.45 5.04