R Under development (unstable) (2024-01-23 r85822 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.R") Loading required package: R.oo Loading required package: R.methodsS3 R.methodsS3 v1.8.2 (2022-06-13 22:00:14 UTC) successfully loaded. See ?R.methodsS3 for help. R.oo v1.26.0 successfully loaded. See ?R.oo for help. Attaching package: 'R.oo' The following object is masked from 'package:R.methodsS3': throw The following objects are masked from 'package:methods': getClasses, getMethods The following objects are masked from 'package:base': attach, detach, load, save R.filesets v2.15.1 successfully loaded. See ?R.filesets for help. Attaching package: 'R.filesets' The following objects are masked from 'package:base': append, readLines > > message("*** GenericDataFileSet") *** GenericDataFileSet > > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > # Empty set > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > ds <- GenericDataFileSet() > print(ds) GenericDataFileSet: Name: NA Full name: NA Number of files: 0 Path (to the first file): NA Total file size: 0 B (0 bytes) > > ## Missingness > print(is.na(ds)) NULL > stopifnot(!any(is.na(ds))) > print(anyNA(ds)) [1] FALSE > stopifnot(!anyNA(ds)) > dsF <- na.omit(ds) > print(dsF) GenericDataFileSet: Name: NA Full name: NA Number of files: 0 Path (to the first file): NA Total file size: 0 B (0 bytes) > stopifnot(length(dsF) == 0) > stopifnot(nbrOfFiles(dsF) == length(dsF)) > > ## Extract non-existing file > dsT <- extract(ds, "foo", onMissing="NA") > print(dsT) GenericDataFileSet: Name: NA Full name: NA Number of files: 1 Names: NA [1] Path (to the first file): NA Total file size: 0 B (0 bytes) > dsT <- ds["foo"] > print(dsT) GenericDataFileSet: Name: NA Full name: NA Number of files: 1 Names: NA [1] Path (to the first file): NA Total file size: 0 B (0 bytes) > > ## Missingness > print(is.na(dsT)) [1] TRUE > stopifnot(any(is.na(dsT))) > print(anyNA(dsT)) [1] TRUE > stopifnot(anyNA(dsT)) > dsF <- na.omit(dsT) > print(dsF) GenericDataFileSet: Name: NA Full name: NA Number of files: 0 Path (to the first file): NA Total file size: 0 B (0 bytes) > stopifnot(length(dsF) == 0) > > ## New instance of non-existing file > ## FIXME: We should support this in the future, cf. NULL > ## dsT <- GenericDataFile(NA_character_) > ## dsT <- newInstance(ds, NA_character_) > > > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > # Set with non-existing file > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > files <- list(GenericDataFile()) > ds <- GenericDataFileSet(files) > print(ds) GenericDataFileSet: Name: NA Full name: NA Number of files: 1 Names: NA [1] Path (to the first file): NA Total file size: 0 B (0 bytes) > > ## Missingness > print(is.na(ds)) [1] TRUE > print(anyNA(ds)) [1] TRUE > dsF <- na.omit(ds) > print(dsF) GenericDataFileSet: Name: NA Full name: NA Number of files: 0 Path (to the first file): NA Total file size: 0 B (0 bytes) > stopifnot(length(dsF) == 0) > > > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > # Setting up a file set > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > path <- system.file("exData", "dataSetA,original", package="R.filesets") > ds <- GenericDataFileSet$byPath(path) > print(ds) GenericDataFileSet: Name: dataSetA Tags: original Full name: dataSetA,original Number of files: 11 Names: 1.2(a), 11.2(a), all, ..., fileFF [11] Path (to the first file): ../../lib/R.filesets/exData/dataSetA,original Total file size: 1.90 KiB (1945 bytes) > > ## Create copy (so that we can write checksum files) > pathT <- tempdir() > ds <- copyTo(ds, path=pathT, overwrite=TRUE) > print(ds) GenericDataFileSet: Name: Rtmpi2ZIiM Tags: Full name: Rtmpi2ZIiM Number of files: 11 Names: 1.2(a), 11.2(a), all, ..., fileFF [11] Path (to the first file): ../../../../../temp/Rtmpi2ZIiM Total file size: 1.90 KiB (1945 bytes) > > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > # Data set > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > cat("Path of data set:\n") Path of data set: > print(getPath(ds)) [1] "../../../../../temp/Rtmpi2ZIiM" > > cat("Fullname of data set:\n") Fullname of data set: > print(getFullName(ds)) [1] "Rtmpi2ZIiM" > > cat("Checksum of data set:\n") Checksum of data set: > print(getChecksum(ds)) [1] "fd7c4c07110f7e453279ab20eb1c0bcb" > > pathnames <- dir(path = path) > print(pathnames) [1] "1.2(a).txt" "11.2(a).txt" "all,fullnames.txt" [4] "fileA,20100112.dat" "fileA,20130116.datx" "fileB,other,tags.dat" [7] "fileC,inverted.dat" "fileD,3cols.dat" "fileE,headerArgs.dat" [10] "fileF.txt" "fileFF.txt" > stopifnot(!any(grepl("[.]md5$", pathnames))) > > cat("Checksum objects:\n") Checksum objects: > checksums <- getChecksumObjects(ds, verbose=TRUE) Retrieving checksum object for identifying this GenericDataFileSet... Number of files: 11 Retrieveing checksums for all files... File #1 ('1.2(a)') checksum: 932b17dafa6774b5a36fd71420ffe706 File #2 ('11.2(a)') checksum: 932b17dafa6774b5a36fd71420ffe706 File #3 ('all,fullnames') checksum: 17176b5f957547d1b23da36fedead87a File #4 ('fileA,20100112') checksum: fcb889d29d51c600409d242e03d7d779 File #5 ('fileA,20130116') checksum: bd28bad7efebce6239e616639742ef4f File #6 ('fileB,other,tags') checksum: e0e0d2750626df38cedab8796cfa6459 File #7 ('fileC,inverted') checksum: b41a700ddec7da6c0ae79ed8b77f7421 File #8 ('fileD,3cols') checksum: aff579b87779ce432d5b99568019cf37 File #9 ('fileE,headerArgs') checksum: 5b4897ffe01d08c8777a3867ae43244d File #10 ('fileF') checksum: 932b17dafa6774b5a36fd71420ffe706 File #11 ('fileFF') checksum: 932b17dafa6774b5a36fd71420ffe706 Retrieveing checksums for all files...done Checksum data for identifying this GenericDataFileSet: List of 2 $ fullname: chr "Rtmpi2ZIiM" $ files :'data.frame': 11 obs. of 2 variables: ..$ fullname: chr [1:11] "1.2(a)" "11.2(a)" "all,fullnames" "fileA,20100112" ... ..$ checksum: chr [1:11] "932b17dafa6774b5a36fd71420ffe706" "932b17dafa6774b5a36fd71420ffe706" "17176b5f957547d1b23da36fedead87a" "fcb889d29d51c600409d242e03d7d779" ... Retrieving checksum object for identifying this GenericDataFileSet...done > print(checksums) $fullname [1] "Rtmpi2ZIiM" $files fullname checksum 1 1.2(a) 932b17dafa6774b5a36fd71420ffe706 2 11.2(a) 932b17dafa6774b5a36fd71420ffe706 3 all,fullnames 17176b5f957547d1b23da36fedead87a 4 fileA,20100112 fcb889d29d51c600409d242e03d7d779 5 fileA,20130116 bd28bad7efebce6239e616639742ef4f 6 fileB,other,tags e0e0d2750626df38cedab8796cfa6459 7 fileC,inverted b41a700ddec7da6c0ae79ed8b77f7421 8 fileD,3cols aff579b87779ce432d5b99568019cf37 9 fileE,headerArgs 5b4897ffe01d08c8777a3867ae43244d 10 fileF 932b17dafa6774b5a36fd71420ffe706 11 fileFF 932b17dafa6774b5a36fd71420ffe706 > > pathnames <- dir(path = path) > print(pathnames) [1] "1.2(a).txt" "11.2(a).txt" "all,fullnames.txt" [4] "fileA,20100112.dat" "fileA,20130116.datx" "fileB,other,tags.dat" [7] "fileC,inverted.dat" "fileD,3cols.dat" "fileE,headerArgs.dat" [10] "fileF.txt" "fileFF.txt" > stopifnot(!any(grepl("[.]md5$", pathnames))) > > > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > # Data files > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > cat("Pathnames:\n") Pathnames: > pathnames <- getPathnames(ds) > print(pathnames) [1] "../../../../../temp/Rtmpi2ZIiM/1.2(a).txt" [2] "../../../../../temp/Rtmpi2ZIiM/11.2(a).txt" [3] "../../../../../temp/Rtmpi2ZIiM/all,fullnames.txt" [4] "../../../../../temp/Rtmpi2ZIiM/fileA,20100112.dat" [5] "../../../../../temp/Rtmpi2ZIiM/fileA,20130116.datx" [6] "../../../../../temp/Rtmpi2ZIiM/fileB,other,tags.dat" [7] "../../../../../temp/Rtmpi2ZIiM/fileC,inverted.dat" [8] "../../../../../temp/Rtmpi2ZIiM/fileD,3cols.dat" [9] "../../../../../temp/Rtmpi2ZIiM/fileE,headerArgs.dat" [10] "../../../../../temp/Rtmpi2ZIiM/fileF.txt" [11] "../../../../../temp/Rtmpi2ZIiM/fileFF.txt" > > cat("Filenames:\n") Filenames: > filenames <- sapply(ds, FUN=getFilename) > print(filenames) 1.2(a) 11.2(a) all,fullnames "1.2(a).txt" "11.2(a).txt" "all,fullnames.txt" fileA,20100112 fileA,20130116 fileB,other,tags "fileA,20100112.dat" "fileA,20130116.datx" "fileB,other,tags.dat" fileC,inverted fileD,3cols fileE,headerArgs "fileC,inverted.dat" "fileD,3cols.dat" "fileE,headerArgs.dat" fileF fileFF "fileF.txt" "fileFF.txt" > stopifnot(all.equal(unname(filenames), basename(pathnames))) > > cat("Extensions:\n") Extensions: > exts <- sapply(ds, FUN=getExtension) > print(exts) 1.2(a) 11.2(a) all,fullnames fileA,20100112 "txt" "txt" "txt" "dat" fileA,20130116 fileB,other,tags fileC,inverted fileD,3cols "datx" "dat" "dat" "dat" fileE,headerArgs fileF fileFF "dat" "txt" "txt" > > cat("Checksums:\n") Checksums: > uids <- sapply(ds, FUN=getChecksum) > print(uids) 1.2(a) 11.2(a) "932b17dafa6774b5a36fd71420ffe706" "932b17dafa6774b5a36fd71420ffe706" all,fullnames fileA,20100112 "17176b5f957547d1b23da36fedead87a" "fcb889d29d51c600409d242e03d7d779" fileA,20130116 fileB,other,tags "bd28bad7efebce6239e616639742ef4f" "e0e0d2750626df38cedab8796cfa6459" fileC,inverted fileD,3cols "b41a700ddec7da6c0ae79ed8b77f7421" "aff579b87779ce432d5b99568019cf37" fileE,headerArgs fileF "5b4897ffe01d08c8777a3867ae43244d" "932b17dafa6774b5a36fd71420ffe706" fileFF "932b17dafa6774b5a36fd71420ffe706" > > > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > # Subsetting > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > df0 <- getFile(ds, 2L) > df1 <- ds[[2L]] > stopifnot(identical(getPathname(df0), getPathname(df1))) > > n <- length(ds) > ds2 <- extract(ds, 1:n) > print(ds2) GenericDataFileSet: Name: Rtmpi2ZIiM Tags: Full name: Rtmpi2ZIiM Number of files: 11 Names: 1.2(a), 11.2(a), all, ..., fileFF [11] Path (to the first file): ../../../../../temp/Rtmpi2ZIiM Total file size: 1.90 KiB (1945 bytes) > > ds3 <- extract(ds, n:1) > print(ds3) GenericDataFileSet: Name: Rtmpi2ZIiM Tags: Full name: Rtmpi2ZIiM Number of files: 11 Names: fileFF, fileF, fileE, ..., 1.2(a) [11] Path (to the first file): ../../../../../temp/Rtmpi2ZIiM Total file size: 1.90 KiB (1945 bytes) > > stopifnot(identical(rev(getPathnames(ds3)), getPathnames(ds2))) > > ds4 <- ds[1:n] > print(ds4) GenericDataFileSet: Name: Rtmpi2ZIiM Tags: Full name: Rtmpi2ZIiM Number of files: 11 Names: 1.2(a), 11.2(a), all, ..., fileFF [11] Path (to the first file): ../../../../../temp/Rtmpi2ZIiM Total file size: 1.90 KiB (1945 bytes) > stopifnot(equals(ds4, ds2)) > > > idxs <- c(1,2,NA,n,NA) > ds5 <- extract(ds, idxs, onMissing="NA") > print(ds5) GenericDataFileSet: Name: Rtmpi2ZIiM Tags: Full name: Rtmpi2ZIiM Number of files: 5 Names: 1.2(a), 11.2(a), NA, fileFF, NA [5] Path (to the first file): ../../../../../temp/Rtmpi2ZIiM Total file size: 459 B (459 bytes) > print(getFullNames(ds5)) [1] "1.2(a)" "11.2(a)" NA "fileFF" NA > print(getFiles(ds5)) [[1]] GenericDataFile: Name: 1.2(a) Tags: Full name: 1.2(a) Pathname: D:/temp/Rtmpi2ZIiM/1.2(a).txt File size: 153 B (153 bytes) [[2]] GenericDataFile: Name: 11.2(a) Tags: Full name: 11.2(a) Pathname: D:/temp/Rtmpi2ZIiM/11.2(a).txt File size: 153 B (153 bytes) [[3]] GenericDataFile: Name: NA Full name: NA Pathname: NA File size: NA [[4]] GenericDataFile: Name: fileFF Tags: Full name: fileFF Pathname: D:/temp/Rtmpi2ZIiM/fileFF.txt File size: 153 B (153 bytes) [[5]] GenericDataFile: Name: NA Full name: NA Pathname: NA File size: NA > > ds5b <- getFiles(ds, na.omit(idxs)) > print(ds5b) [[1]] GenericDataFile: Name: 1.2(a) Tags: Full name: 1.2(a) Pathname: D:/temp/Rtmpi2ZIiM/1.2(a).txt File size: 153 B (153 bytes) [[2]] GenericDataFile: Name: 11.2(a) Tags: Full name: 11.2(a) Pathname: D:/temp/Rtmpi2ZIiM/11.2(a).txt File size: 153 B (153 bytes) [[3]] GenericDataFile: Name: fileFF Tags: Full name: fileFF Pathname: D:/temp/Rtmpi2ZIiM/fileFF.txt File size: 153 B (153 bytes) > stopifnot(equals(ds5b, getFiles(ds)[na.omit(idxs)])) > > stopifnot(identical(is.na(idxs), unname(is.na(getPathnames(ds5))))) > > ds6 <- ds[idxs, onMissing="NA"] > print(ds6) GenericDataFileSet: Name: Rtmpi2ZIiM Tags: Full name: Rtmpi2ZIiM Number of files: 5 Names: 1.2(a), 11.2(a), NA, fileFF, NA [5] Path (to the first file): ../../../../../temp/Rtmpi2ZIiM Total file size: 459 B (459 bytes) > stopifnot(equals(ds6, ds5)) > > ds7 <- ds[c(1,2,NA_integer_), onMissing="dropall"] > stopifnot(length(ds7) == 0L) > > ds8 <- rep(ds, each=2L) > stopifnot(length(ds8) == 2*length(ds)) > stopifnot(equals(ds8, ds[rep(seq_along(ds), each=2L)])) > > ds9 <- rep(ds8, times=3L) > stopifnot(length(ds9) == 3*length(ds8)) > stopifnot(equals(ds9, ds8[rep(seq_along(ds8), times=3L)])) > > ds10 <- rep(ds9, length.out=1/2*length(ds9)) > stopifnot(length(ds10) == 1/2*length(ds9)) > stopifnot(equals(ds10, ds9[rep(seq_along(ds9), length.out=1/2*length(ds9))])) > > ds11 <- rep(ds10, length.out=2*length(ds10)) > stopifnot(length(ds11) == 2*length(ds10)) > stopifnot(equals(ds11, ds10[rep(seq_along(ds10), length.out=2*length(ds10))])) > > > > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > # Special cases > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > dsEmpty <- R.oo::newInstance(ds) > stopifnot(length(dsEmpty) == 0L) > > dsEmpty <- ds[c()] > stopifnot(length(dsEmpty) == 0L) > > dsExpanded <- dsEmpty[rep(NA_integer_, times=5L)] > stopifnot(length(dsExpanded) == 5L) > > > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > # Constructing data sets > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > files <- as.list(ds) > ds2 <- GenericDataFileSet(files) > print(ds2) GenericDataFileSet: Name: Rtmpi2ZIiM Tags: Full name: Rtmpi2ZIiM Number of files: 11 Names: 1.2(a), 11.2(a), all, ..., fileFF [11] Path (to the first file): ../../../../../temp/Rtmpi2ZIiM Total file size: 1.90 KiB (1945 bytes) > stopifnot(equals(ds2, ds)) > > ds3 <- GenericDataFileSet(ds) > print(ds3) GenericDataFileSet: Name: Rtmpi2ZIiM Tags: Full name: Rtmpi2ZIiM Number of files: 11 Names: 1.2(a), 11.2(a), all, ..., fileFF [11] Path (to the first file): ../../../../../temp/Rtmpi2ZIiM Total file size: 1.90 KiB (1945 bytes) > stopifnot(equals(ds3, ds)) > > ds4 <- GenericDataFileSet(c(ds,ds)) > print(ds4) GenericDataFileSet: Name: Rtmpi2ZIiM Tags: Full name: Rtmpi2ZIiM Number of files: 22 Names: 1.2(a), 11.2(a), all, ..., fileFF [22] Path (to the first file): ../../../../../temp/Rtmpi2ZIiM Total file size: 3.80 KiB (3890 bytes) > stopifnot(equals(ds4, c(ds,ds))) > > > > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > # Dataset A > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > path <- system.file("exData/dataSetA,original", package="R.filesets") > ds <- GenericDataFileSet$byPath(path) > print(ds) GenericDataFileSet: Name: dataSetA Tags: original Full name: dataSetA,original Number of files: 11 Names: 1.2(a), 11.2(a), all, ..., fileFF [11] Path (to the first file): ../../lib/R.filesets/exData/dataSetA,original Total file size: 1.90 KiB (1945 bytes) > names <- getNames(ds) > print(names) [1] "1.2(a)" "11.2(a)" "all" "fileA" "fileA" "fileB" "fileC" [8] "fileD" "fileE" "fileF" "fileFF" > > ## Indices of all files > cat("Indices:\n") Indices: > idxs <- indexOf(ds) > print(idxs) 1.2(a) 11.2(a) all fileA fileA fileB fileC fileD fileE fileF 1 2 3 4 5 6 7 8 9 10 fileFF 11 > > # Exact matching > by <- "exact"; > cat(sprintf("By: %s\n", paste(by, collapse=", "))) By: exact > for (name in names) { + idxs <- indexOf(ds, name, by=by) + cat(sprintf(" %s @ %s\n", name, paste(idxs, collapse=", "))) + stopifnot(all(idxs == which(name == names))) + } 1.2(a) @ 1 11.2(a) @ 2 all @ 3 fileA @ 4, 5 fileA @ 4, 5 fileB @ 6 fileC @ 7 fileD @ 8 fileE @ 9 fileF @ 10 fileFF @ 11 > > # Fixed regular expression matching > by <- "fixed"; > cat(sprintf("By: %s\n", paste(by, collapse=", "))) By: fixed > for (name in names) { + idxs <- indexOf(ds, name, by=by) + cat(sprintf(" %s @ %s\n", name, paste(idxs, collapse=", "))) + stopifnot(all(idxs == grep(name, names))) + } 1.2(a) @ 1, 2 11.2(a) @ 2 all @ 3 fileA @ 4, 5 fileA @ 4, 5 fileB @ 6 fileC @ 7 fileD @ 8 fileE @ 9 fileF @ 10, 11 fileFF @ 11 > > # Regular expression matching > by <- "regexp"; > cat(sprintf("By: %s\n", paste(by, collapse=", "))) By: regexp > for (name in names) { + idxs <- indexOf(ds, name, by=by) + pattern <- sprintf("^%s$", name) + cat(sprintf(" %s @ %s\n", name, paste(idxs, collapse=", "))) + stopifnot(all(idxs == grep(pattern, names))) + } 1.2(a) @ NA 11.2(a) @ NA all @ 3 fileA @ 4, 5 fileA @ 4, 5 fileB @ 6 fileC @ 7 fileD @ 8 fileE @ 9 fileF @ 10 fileFF @ 11 > > # First regular expression matching, then fixed > by <- c("regexp", "fixed"); > cat(sprintf("By: %s\n", paste(by, collapse=", "))) By: regexp, fixed > for (name in names) { + idxs <- indexOf(ds, name, by=by) + cat(sprintf(" %s @ %s\n", name, paste(idxs, collapse=", "))) + } 1.2(a) @ 1, 2 11.2(a) @ 2 all @ 3 fileA @ 4, 5 fileA @ 4, 5 fileB @ 6 fileC @ 7 fileD @ 8 fileE @ 9 fileF @ 10 fileFF @ 11 > > # First exact, then regular expression matching, then fixed > by <- c("exact", "regexp", "fixed"); > cat(sprintf("By: %s\n", paste(by, collapse=", "))) By: exact, regexp, fixed > for (name in names) { + idxs <- indexOf(ds, name, by=by) + cat(sprintf(" %s @ %s\n", name, paste(idxs, collapse=", "))) + } 1.2(a) @ 1 11.2(a) @ 2 all @ 3 fileA @ 4, 5 fileA @ 4, 5 fileB @ 6 fileC @ 7 fileD @ 8 fileE @ 9 fileF @ 10 fileFF @ 11 > > # The default, which operates as previous step > cat("By: \n") By: > for (name in names) { + idxs <- indexOf(ds, name) + cat(sprintf(" %s @ %s\n", name, paste(idxs, collapse=", "))) + } 1.2(a) @ 1 11.2(a) @ 2 all @ 3 fileA @ 4, 5 fileA @ 4, 5 fileB @ 6 fileC @ 7 fileD @ 8 fileE @ 9 fileF @ 10 fileFF @ 11 > > > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - > # Unknown arguments > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - > ds <- GenericDataFileSet(foobar=42L, .onUnknownArgs="ignore") > ds <- GenericDataFileSet(foobar=42L, .onUnknownArgs="warning") Warning in GenericDataFileSet(foobar = 42L, .onUnknownArgs = "warning") : Unknown arguments: foobar > res <- try(ds <- GenericDataFileSet(foobar=42L, .onUnknownArgs="error"), silent=TRUE) > stopifnot(inherits(res, "try-error")) > > source("incl/end.R") > > proc.time() user system elapsed 14.46 59.17 75.20