R version 4.4.0 alpha (2024-03-26 r86209 ucrt) 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") [15:30:56.088] Detected 'R CMD check': - adjusting defaults to be a good citizen [15:30:56.091] Set package option 'parallelly.availableCores.methods' [15:30:56.092] Environment variable 'R_PARALLELLY_AVAILABLECORES_METHODS' not set [15:30:56.093] Set package option 'parallelly.availableCores.fallback' [15:30:56.093] Environment variable 'R_PARALLELLY_AVAILABLECORES_FALLBACK' not set [15:30:56.093] Set package option 'parallelly.availableCores.min' [15:30:56.094] Environment variable 'R_PARALLELLY_AVAILABLECORES_MIN' not set [15:30:56.094] Set package option 'parallelly.availableCores.system' [15:30:56.095] Environment variable 'R_PARALLELLY_AVAILABLECORES_SYSTEM' not set [15:30:56.095] Set package option 'parallelly.availableCores.logical' [15:30:56.096] Environment variable 'R_PARALLELLY_AVAILABLECORES_LOGICAL' not set [15:30:56.096] Set package option 'parallelly.availableCores.omit' [15:30:56.097] Environment variable 'R_PARALLELLY_AVAILABLECORES_OMIT' not set [15:30:56.097] Set package option 'parallelly.availableWorkers.methods' [15:30:56.097] Environment variable 'R_PARALLELLY_AVAILABLEWORKERS_METHODS' not set [15:30:56.098] Set package option 'parallelly.maxWorkers.localhost' [15:30:56.098] Environment variable 'R_PARALLELLY_MAXWORKERS_LOCALHOST' not set [15:30:56.099] Set package option 'parallelly.maxWorkers.localhost.ignore' [15:30:56.099] Environment variable 'R_PARALLELLY_MAXWORKERS_LOCALHOST_IGNORE' not set [15:30:56.100] Set package option 'parallelly.fork.enable' [15:30:56.100] Environment variable 'R_PARALLELLY_FORK_ENABLE' not set [15:30:56.101] Set package option 'parallelly.supportsMulticore.disableOn' [15:30:56.101] Environment variable 'R_PARALLELLY_SUPPORTSMULTICORE_DISABLEON' not set [15:30:56.101] Set package option 'parallelly.supportsMulticore.unstable' [15:30:56.102] Environment variable 'R_PARALLELLY_SUPPORTSMULTICORE_UNSTABLE' not set [15:30:56.102] Set package option 'parallelly.makeNodePSOCK.setup_strategy' [15:30:56.103] Environment variable 'R_PARALLELLY_MAKENODEPSOCK_SETUP_STRATEGY' not set [15:30:56.103] Set package option 'parallelly.makeNodePSOCK.validate' [15:30:56.104] Environment variable 'R_PARALLELLY_MAKENODEPSOCK_VALIDATE' not set [15:30:56.104] Set package option 'parallelly.makeNodePSOCK.connectTimeout' [15:30:56.104] R_PARALLELLY_MAKENODEPSOCK_CONNECTTIMEOUT='120' [15:30:56.105] Coercing from character to numeric: '120' [15:30:56.105] => options("parallelly.makeNodePSOCK.connectTimeout" = '120') [n=1, mode=double] [15:30:56.106] Set package option 'parallelly.makeNodePSOCK.timeout' [15:30:56.106] R_PARALLELLY_MAKENODEPSOCK_TIMEOUT='120' [15:30:56.107] Coercing from character to numeric: '120' [15:30:56.107] => options("parallelly.makeNodePSOCK.timeout" = '120') [n=1, mode=double] [15:30:56.107] Set package option 'parallelly.makeNodePSOCK.useXDR' [15:30:56.108] Environment variable 'R_PARALLELLY_MAKENODEPSOCK_USEXDR' not set [15:30:56.109] Set package option 'parallelly.makeNodePSOCK.socketOptions' [15:30:56.109] Environment variable 'R_PARALLELLY_MAKENODEPSOCK_SOCKETOPTIONS' not set [15:30:56.110] Set package option 'parallelly.makeNodePSOCK.rshcmd' [15:30:56.110] Environment variable 'R_PARALLELLY_MAKENODEPSOCK_RSHCMD' not set [15:30:56.111] Set package option 'parallelly.makeNodePSOCK.rshopts' [15:30:56.111] Environment variable 'R_PARALLELLY_MAKENODEPSOCK_RSHOPTS' not set [15:30:56.113] Set package option 'parallelly.makeNodePSOCK.tries' [15:30:56.114] Environment variable 'R_PARALLELLY_MAKENODEPSOCK_TRIES' not set [15:30:56.115] Set package option 'parallelly.makeNodePSOCK.tries.delay' [15:30:56.115] Environment variable 'R_PARALLELLY_MAKENODEPSOCK_TRIES_DELAY' not set [15:30:56.116] Set package option 'parallelly.makeNodePSOCK.rscript_label' [15:30:56.117] R_PARALLELLY_MAKENODEPSOCK_RSCRIPT_LABEL='TRUE' [15:30:56.117] => options("parallelly.makeNodePSOCK.rscript_label" = 'TRUE') [n=1, mode=character] [15:30:56.118] Set package option 'parallelly.makeNodePSOCK.sessionInfo.pkgs' [15:30:56.118] R_PARALLELLY_MAKENODEPSOCK_SESSIONINFO_PKGS='TRUE' [15:30:56.118] => options("parallelly.makeNodePSOCK.sessionInfo.pkgs" = 'TRUE') [n=1, mode=character] [15:30:56.119] Set package option 'parallelly.makeNodePSOCK.autoKill' [15:30:56.119] R_PARALLELLY_MAKENODEPSOCK_AUTOKILL='TRUE' [15:30:56.120] Coercing from character to logical: 'TRUE' [15:30:56.120] => options("parallelly.makeNodePSOCK.autoKill" = 'TRUE') [n=1, mode=logical] [15:30:56.120] Set package option 'parallelly.makeNodePSOCK.master.localhost.hostname' [15:30:56.121] Environment variable 'R_PARALLELLY_MAKENODEPSOCK_MASTER_LOCALHOST_HOSTNAME' not set [15:30:56.121] Set package option 'parallelly.makeNodePSOCK.port.increment' [15:30:56.122] Environment variable 'R_PARALLELLY_MAKENODEPSOCK_PORT_INCREMENT' not set [15:30:56.124] 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' [15:30:56.139] Future-specific environment variables: [15:30:56.139] Environment variable 'R_FUTURE_DEMO_MANDELBROT_REGION' not set [15:30:56.140] Environment variable 'R_FUTURE_DEMO_MANDELBROT_NROW' not set [15:30:56.140] Environment variable 'R_FUTURE_DEPRECATED_IGNORE' not set [15:30:56.140] Environment variable 'R_FUTURE_DEPRECATED_DEFUNCT' not set [15:30:56.141] Environment variable 'R_FUTURE_FORK_MULTITHREADING_ENABLE' not set [15:30:56.141] Environment variable 'R_FUTURE_GLOBALS_MAXSIZE' not set [15:30:56.141] Environment variable 'R_FUTURE_GLOBALS_ONMISSING' not set [15:30:56.142] Environment variable 'R_FUTURE_GLOBALS_ONREFERENCE' not set [15:30:56.142] Environment variable 'R_FUTURE_GLOBALS_METHOD' not set [15:30:56.142] Environment variable 'R_FUTURE_GLOBALS_RESOLVE' not set [15:30:56.143] Environment variable 'R_FUTURE_LAZY_ASSERTOWNER' not set [15:30:56.143] Environment variable 'R_FUTURE_PLAN' not set [15:30:56.143] Environment variable 'R_FUTURE_PLAN_DISALLOW' not set [15:30:56.144] Environment variable 'R_FUTURE_PSOCK_RELAY_IMMEDIATE' not set [15:30:56.144] Environment variable 'R_FUTURE_RELAY_IMMEDIATE' not set [15:30:56.144] Environment variable 'R_FUTURE_RESOLVE_RECURSIVE' not set [15:30:56.145] Environment variable 'R_FUTURE_ALIVE_TIMEOUT' not set [15:30:56.145] Environment variable 'R_FUTURE_RESOLVED_TIMEOUT' not set [15:30:56.145] Environment variable 'R_FUTURE_CLUSTER_RESOLVED_TIMEOUT' not set [15:30:56.145] Environment variable 'R_FUTURE_MULTICORE_RESOLVED_TIMEOUT' not set [15:30:56.146] Environment variable 'R_FUTURE_ONFUTURECONDITION_KEEPFUTURE' not set [15:30:56.146] Environment variable 'R_FUTURE_RNG_ONMISUSE' not set [15:30:56.146] Environment variable 'R_FUTURE_GLOBALENV_ONMISUSE' not set [15:30:56.147] Environment variable 'R_FUTURE_WAIT_TIMEOUT' not set [15:30:56.147] Environment variable 'R_FUTURE_WAIT_INTERVAL' not set [15:30:56.147] Environment variable 'R_FUTURE_WAIT_ALPHA' not set [15:30:56.148] Environment variable 'R_FUTURE_ASSIGN_GLOBALS_EXCLUDE' not set [15:30:56.148] Environment variable 'R_FUTURE_OUTPUT_WINDOWS_REENCODE' not set [15:30:56.148] Environment variable 'R_FUTURE_GLOBALS_GLOBALSOF_LOCALS' not set [15:30:56.148] Environment variable 'R_FUTURE_STATE_ONINVALID' not set [15:30:56.149] Environment variable 'R_FUTURE_JOURNAL' not set [15:30:56.149] Environment variable 'R_FUTURE_GLOBALS_KEEPWHERE' not set [15:30:56.151] R process uuid: 92de57a9-5da3-8afb-5e9b-69d7f933bb4b [15:30:56.151] Setting plan('default') [15:30:56.152] plan(): Setting new future strategy stack: [15:30:56.153] List of future strategies: [15:30:56.153] 1. sequential: [15:30:56.153] - args: function (..., envir = parent.frame(), workers = "") [15:30:56.153] - tweaked: FALSE [15:30:56.153] - call: NULL [15:30:56.155] plan(): nbrOfWorkers() = 1 [15:30:56.192] plan(): Setting new future strategy stack: [15:30:56.192] List of future strategies: [15:30:56.192] 1. sequential: [15:30:56.192] - args: function (..., envir = parent.frame(), workers = "") [15:30:56.192] - tweaked: FALSE [15:30:56.192] - call: future::plan("sequential") [15:30:56.213] 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") [15:31:03.170] plan(): Setting new future strategy stack: [15:31:03.171] List of future strategies: [15:31:03.171] 1. FutureStrategy: [15:31:03.171] - args: function (..., envir = parent.frame(), workers = "") [15:31:03.171] - tweaked: FALSE [15:31:03.171] - call: future::plan(oplan) [15:31:03.200] plan(): nbrOfWorkers() = 1 > > proc.time() user system elapsed 4.84 2.65 7.46