Running 'ChecksumFile.R' [102s]
  Running 'GenericDataFile.R' [210s]
  Running 'GenericDataFileSet,sortBy.R' [2s]
  Running 'GenericDataFileSet.R' [94s]
  Running 'RDataFileSet.R' [158s]
  Running 'RdsFileSet.R' [1s]
  Running 'TabularTextFile,extend.R' [1s]
  Running 'TabularTextFile,huge.R' [223s]
  Running 'TabularTextFile.R' [156s]
  Running 'TabularTextFileSet.R' [154s]
  Running 'VectorAndListAPI.R' [99s]
  Running 'fullname.R' [172s]
  Running 'readDataFrame.R' [38s]
Running the tests in 'tests/GenericDataFile.R' failed.
Complete output:
  > 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 (2024-01-24 05:12:50 UTC) 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 (2024-01-24 17:22:49 UTC) successfully loaded. See ?R.filesets for help.
  
  Attaching package: 'R.filesets'
  
  The following objects are masked from 'package:base':
  
      append, readLines
  
  > 
  > message("*** GenericDataFile ...")
  *** GenericDataFile ...
  > 
  > ## Example files
  > path <- system.file("exData", "dataSetA,original", package="R.filesets")
  > print(path)
  [1] "D:/RCompile/CRANpkg/lib/4.4/R.filesets/exData/dataSetA,original"
  > 
  > ## Setting up a file set
  > 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/4.4/R.filesets/exData/dataSetA,original
  Total file size: 1.90 KiB (1945 bytes)
  > 
  > df <- ds[[1L]]
  > print(df)
  GenericDataFile:
  Name: 1.2(a)
  Tags: 
  Full name: 1.2(a)
  Pathname: ../../../../lib/4.4/R.filesets/exData/dataSetA,original/1.2(a).txt
  File size: 153 B (153 bytes)
  > 
  > cat(sprintf("Created on: %s\n", getCreatedOn(df)))
  Created on: 2024-03-23 04:34:37.364344
  > cat(sprintf("Accessed on: %s\n", getLastAccessedOn(df)))
  Accessed on: 2024-03-23 04:34:37.364344
  > 
  > ## Missingness
  > print(is.na(df))
  [1] FALSE
  > 
  > 
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > # Comparisons
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > pathT <- file.path(tempdir(), "copy")
  > ds <- copyTo(ds, path=pathT, overwrite=TRUE)
  > 
  > df <- ds[[1]]
  > res <- equals(df, df)
  > print(res)
  [1] TRUE
  > stopifnot(res)
  > 
  > res <- equals(df, NULL)
  > print(res)
  [1] FALSE
  attr(,"thisFile")
  [1] "../../../../../../temp/RtmpwVojtO/copy/1.2(a).txt"
  attr(,"reason")
  [1] "The 'other' is not a GenericDataFile: NULL"
  > stopifnot(!res)
  > 
  > res <- equals(df, NA)
  > print(res)
  [1] FALSE
  attr(,"thisFile")
  [1] "../../../../../../temp/RtmpwVojtO/copy/1.2(a).txt"
  attr(,"reason")
  [1] "The 'other' is not a GenericDataFile: logical"
  > stopifnot(!res)
  > 
  > res <- equals(df, ds)
  > print(res)
  [1] FALSE
  attr(,"thisFile")
  [1] "../../../../../../temp/RtmpwVojtO/copy/1.2(a).txt"
  attr(,"reason")
  [1] "The 'other' is not a GenericDataFile: GenericDataFileSet"
  > stopifnot(!res)
  > 
  > print(df)
  GenericDataFile:
  Name: 1.2(a)
  Tags: 
  Full name: 1.2(a)
  Pathname: D:/temp/RtmpwVojtO/copy/1.2(a).txt
  File size: 153 B (153 bytes)
  > print(getChecksum(df, verbose=TRUE))
  [1] "932b17dafa6774b5a36fd71420ffe706"
  > print(readChecksum(df))
  [1] "932b17dafa6774b5a36fd71420ffe706"
  > 
  > print(df)
  GenericDataFile:
  Name: 1.2(a)
  Tags: 
  Full name: 1.2(a)
  Pathname: D:/temp/RtmpwVojtO/copy/1.2(a).txt
  File size: 153 B (153 bytes)
  > print(getChecksum(df, force=TRUE, verbose=TRUE))
  [1] "932b17dafa6774b5a36fd71420ffe706"
  > 
  > print(df)
  GenericDataFile:
  Name: 1.2(a)
  Tags: 
  Full name: 1.2(a)
  Pathname: D:/temp/RtmpwVojtO/copy/1.2(a).txt
  File size: 153 B (153 bytes)
  > print(getChecksum(df, write=TRUE, force=TRUE, verbose=TRUE))
  [1] "932b17dafa6774b5a36fd71420ffe706"
  > 
  > print(df)
  GenericDataFile:
  Name: 1.2(a)
  Tags: 
  Full name: 1.2(a)
  Pathname: D:/temp/RtmpwVojtO/copy/1.2(a).txt
  File size: 153 B (153 bytes)
  > print(getChecksum(df, write=FALSE, force=TRUE, verbose=TRUE))
  [1] "932b17dafa6774b5a36fd71420ffe706"
  > 
  > 
  > pathT <- file.path(tempdir(), "foo")
  > dfC <- copyTo(df, path=pathT, overwrite=TRUE)
  > print(dfC)
  GenericDataFile:
  Name: 1.2(a)
  Tags: 
  Full name: 1.2(a)
  Pathname: D:/temp/RtmpwVojtO/foo/1.2(a).txt
  File size: 153 B (153 bytes)
  > res <- equals(df, dfC)
  > print(res)
  [1] TRUE
  > stopifnot(res)
  > mod <- hasBeenModified(dfC)
  > stopifnot(!mod)
  > print(getChecksum(dfC))
  [1] "932b17dafa6774b5a36fd71420ffe706"
  > 
  > mod1 <- hasBeenModified(dfC, update=FALSE)
  > print(mod1)
  [1] FALSE
  attr(,"lastModifiedOn")
  [1] "2024-03-23 09:04:19 CET"
  attr(,"prevModifiedOn")
  [1] "2024-03-23 09:04:19 CET"
  > mod2 <- hasBeenModified(dfC, update=FALSE)
  > print(mod2)
  [1] FALSE
  attr(,"lastModifiedOn")
  [1] "2024-03-23 09:04:19 CET"
  attr(,"prevModifiedOn")
  [1] "2024-03-23 09:04:19 CET"
  > stopifnot(identical(mod2, mod1))
  > 
  > 
  > ## Make sure we can detect differences in timestamps
  > Sys.sleep(1.5)
  > raw <- raw(length=getFileSize(dfC))
  > writeBin(raw, con=getPathname(dfC))
  > print(dfC)
  GenericDataFile:
  Name: 1.2(a)
  Tags: 
  Full name: 1.2(a)
  Pathname: D:/temp/RtmpwVojtO/foo/1.2(a).txt
  File size: 153 B (153 bytes)
  > print(getChecksum(dfC))
  [1] "d13b5ffdeb538f15ee1d30f2788601d5"
  > 
  > res <- equals(df, dfC)
  > print(res)
  [1] FALSE
  attr(,"thisFile")
  [1] "../../../../../../temp/RtmpwVojtO/copy/1.2(a).txt"
  attr(,"otherFile")
  [1] "../../../../../../temp/RtmpwVojtO/foo/1.2(a).txt"
  attr(,"reason")
  [1] "The checksums differ: 932b17dafa6774b5a36fd71420ffe706 != d13b5ffdeb538f15ee1d30f2788601d5"
  > stopifnot(!res)
  > 
  > 
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > # Checksum files
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > print(hasChecksumFile(df))
  [1] TRUE
  > 
  > print(getChecksum(df))
  [1] "932b17dafa6774b5a36fd71420ffe706"
  > print(writeChecksum(df))
  [1] "../../../../../../temp/RtmpwVojtO/copy/1.2(a).txt.md5"
  > 
  > dfZ <- getChecksumFile(df, verbose=TRUE)
  Getting checksum file...
   Pathname: ../../../../../../temp/RtmpwVojtO/copy/1.2(a).txt
   Detected existing checksum file...
   Detected existing checksum file...done
  Getting checksum file...done
  > print(dfZ)
  ChecksumFile:
  Name: 1.2(a).txt
  Tags: 
  Full name: 1.2(a).txt
  Pathname: d:/temp/RtmpwVojtO/copy/1.2(a).txt.md5
  File size: 32 B (32 bytes)
  Checksum on record: 932b17dafa6774b5a36fd71420ffe706
  > validate(dfZ)
  > 
  > dfZ <- getChecksumFile(df, force=TRUE)
  > print(dfZ)
  ChecksumFile:
  Name: 1.2(a).txt
  Tags: 
  Full name: 1.2(a).txt
  Pathname: d:/temp/RtmpwVojtO/copy/1.2(a).txt.md5
  File size: 32 B (32 bytes)
  Checksum on record: 932b17dafa6774b5a36fd71420ffe706
  > validate(dfZ)
  > 
  > 
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > # copyTo() / renameTo()
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > message("*** copyTo() / renameTo() on GenericDataFile")
  *** copyTo() / renameTo() on GenericDataFile
  > 
  > # Copy it to a temporary directory
  > path <- tempdir()
  > dfC <- copyTo(df, path=path, overwrite=TRUE)
  > 
  > # Sanity check
  > stopifnot(getPathname(dfC) != getPathname(df))
  > stopifnot(equals(dfC, df))
  > 
  > # Try to copy it without overwriting nor skipping
  > fail <- tryCatch({
  +   copyTo(df, path=path, overwrite=FALSE, skip=FALSE)
  +   FALSE
  + }, error = function(ex) { TRUE })
  > stopifnot(fail)
  > 
  > # Copy it again by overwriting exiting output
  > dfC <- copyTo(df, path=path, overwrite=TRUE)
  > print(dfC)
  GenericDataFile:
  Name: 1.2(a)
  Tags: 
  Full name: 1.2(a)
  Pathname: D:/temp/RtmpwVojtO/1.2(a).txt
  File size: 153 B (153 bytes)
  > # Sanity checks
  > stopifnot(getPathname(dfC) != getPathname(df),
  +           getChecksum(dfC) == getChecksum(df))
  > 
  > ## renameTo() may fail on some test systems.
  > ## See R.utils Issue #42.
  > if (FALSE) {
  + dfR <- renameTo(dfC, getPathname(dfC), verbose=TRUE)
  + stopifnot(equals(dfR, df))
  + 
  + filenameC <- getFilename(dfC)
  + filenameR <- sprintf("%s.foo", filenameC)
  + dfR <- renameTo(dfC, filenameR, verbose=TRUE)
  + print(dfR)
  + stopifnot(equals(dfR, df))
  + 
  + dfC2 <- renameTo(dfR, filenameC, verbose=TRUE)
  + print(dfC2)
  + stopifnot(getFilename(dfC2) == filenameC)
  + stopifnot(equals(dfR, df))
  + }
  > 
  > 
  > # Cleanup
  > file.remove(getPathname(dfC))
  [1] TRUE
  > 
  > # Sanity checks
  > stopifnot(!isFile(dfC))
  > stopifnot(isFile(df))
  > 
  > 
  > message("*** copyTo() / renameTo() on GenericDataFile ... DONE")
  *** copyTo() / renameTo() on GenericDataFile ... DONE
  > 
  > 
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > # linkTo()
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > message("*** linkTo() on GenericDataFile")
  *** linkTo() on GenericDataFile
  > 
  > # Link to it in a temporary directory
  > path <- tempdir()
  > 
  > # On Windows, necessary privileges are required.  If not
  > # available, generate a warning and not an error.
  > if (.Platform$OS.type == "windows") {
  +   dfL <- NULL
  +   tryCatch({
  +     dfL <- linkTo(df, path=path)
  +   }, error = function(ex) {
  +     print(ex)
  +     cat("The above exception was caught but ignored for this package system test\n")
  +   })
  + 
  +   if (!is.null(dfL)) {
  +     print(dfL)
  + 
  +     # Sanity checks
  +     stopifnot(getChecksum(dfL) == getChecksum(df))
  + 
  +     # Copy file (via link) - unless a Windows Shortcut link
  +     isWindowsShortcut <- (getPathname(dfL) == getPathname(df))
  +     if (!isWindowsShortcut) {
  +       dfLC <- copyTo(dfL, path=file.path(path, "foo"), overwrite=TRUE, validate=FALSE)
  + 
  +       if (getPathname(dfLC) == getPathname(df) ||
  +           getChecksum(dfLC) != getChecksum(df)) {
  +         print(dfLC)
  +         print(getChecksum(dfLC))
  +         print(df)
  +         print(getChecksum(df))
  +       }
  + 
  +       # Sanity checks
  +       stopifnot(getPathname(dfLC) != getPathname(df),
  +                 getChecksum(dfLC) == getChecksum(df))
  +       # Cleanup
  +       file.remove(getPathname(dfLC))
  +       # Sanity checks
  +       stopifnot(!isFile(dfLC))
  +       stopifnot(isFile(dfL))
  +       stopifnot(isFile(df))
  +       # Cleanup
  +       file.remove(getPathname(dfL))
  +     } else {
  +       # Done with the Windows Shortcut link
  +       dfL <- NULL
  +     }
  +   }
  + } else {
  +   dfL <- linkTo(df, path=path)
  +   print(dfL)
  + 
  +   # Sanity checks
  +   stopifnot(getPathname(dfL) != getPathname(df),
  +             getChecksum(dfL) == getChecksum(df))
  + 
  +   # Copy file (via link)
  +   dfLC <- copyTo(dfL, path=file.path(path, "foo"), overwrite=TRUE)
  +   # Sanity checks
  +   stopifnot(getPathname(dfLC) != getPathname(df),
  +             getChecksum(dfLC) == getChecksum(df))
  +   # Cleanup
  +   file.remove(getPathname(dfLC))
  +   # Sanity checks
  +   stopifnot(!isFile(dfLC))
  +   stopifnot(isFile(dfL))
  +   stopifnot(isFile(df))
  + 
  +   # Cleanup
  +   file.remove(getPathname(dfL))
  + } # if (.Platform$OS.type == "windows")
  Ihre Berechtigungen reichen nicht aus, um diesen Vorgang auszuführen.
  Warning in system(cmd, intern = intern, wait = wait | intern, show.output.on.console = wait,  :
    running command 'C:\Windows\system32\cmd.exe /c mklink "D:/temp/RtmpwVojtO/1.2(a).txt" "D:/temp/RtmpwVojtO/copy/1.2(a).txt"' had status 1
  GenericDataFile:
  Name: 1.2(a)
  Tags: 
  Full name: 1.2(a)
  Pathname: D:/temp/RtmpwVojtO/copy/1.2(a).txt
  File size: 153 B (153 bytes)
  > 
  > # Sanity checks
  > stopifnot(!isFile(dfL))
  > stopifnot(isFile(df))
  > 
  > 
  > 
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > # Unknown arguments
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > df <- GenericDataFile(mustExist=FALSE, foobar=42L, .onUnknownArgs="ignore")
  > df <- GenericDataFile(mustExist=FALSE, foobar=42L, .onUnknownArgs="warning")
  Warning in GenericDataFile(mustExist = FALSE, foobar = 42L, .onUnknownArgs = "warning") :
    Unknown arguments: foobar
  > res <- try(df <- GenericDataFile(mustExist=FALSE, foobar=42L, .onUnknownArgs="error"), silent=TRUE)
  > stopifnot(inherits(res, "try-error"))
  > 
  > checksum <- getChecksum(df)
  > print(checksum)
  [1] NA
  > stopifnot(is.na(checksum))
  > 
  > 
  > message("*** GenericDataFile ... DONE")
  *** GenericDataFile ... DONE
  > 
  > source("incl/end.R")
  > 
  > proc.time()
     user  system elapsed 
     5.92   38.68   49.31 
Running the tests in 'tests/RDataFileSet.R' failed.
Complete output:
  > 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 (2024-01-24 05:12:50 UTC) 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 (2024-01-24 17:22:49 UTC) successfully loaded. See ?R.filesets for help.
  
  Attaching package: 'R.filesets'
  
  The following objects are masked from 'package:base':
  
      append, readLines
  
  > 
  > message("*** RDataFileSet")
  *** RDataFileSet
  > 
  > x <- list(a=1, b=2)
  > y <- letters[1:10]
  > z <- NULL
  > 
  > save(x, file="x.RData")
  > save(y, file="y.RData")
  > save(z, file="z.RData")
  > 
  > ds <- RDataFileSet$byPath(".")
  > print(ds)
  RDataFileSet:
  Name: .
  Tags: 
  Full name: .
  Number of files: 3
  Names: x, y, z [3]
  Path (to the first file): .
  Total file size: 258 B (258 bytes)
  > 
  > x2 <- loadObject(ds[["x"]])
  > stopifnot(identical(x2, x))
  > 
  > res <- loadObject(ds[["x"]], drop=FALSE)
  > stopifnot(identical(res$x, x))
  > 
  > y2 <- loadObject(ds[["y"]])
  > stopifnot(identical(y2, y))
  > 
  > z2 <- loadObject(ds[["z"]])
  > stopifnot(is.null(z2))
  > 
  > env <- loadToEnv(ds[["x"]])
  > stopifnot(identical(env$x, x))
  > 
  > message("*** RDataFileSet ... DONE")
  *** RDataFileSet ... DONE
  > 
  > source("incl/end.R")
  > 
  > proc.time()
     user  system elapsed 
     0.56    0.06    0.62 
Running the tests in 'tests/TabularTextFile,huge.R' failed.
Complete output:
  > 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 (2024-01-24 05:12:50 UTC) 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 (2024-01-24 17:22:49 UTC) successfully loaded. See ?R.filesets for help.
  
  Attaching package: 'R.filesets'
  
  The following objects are masked from 'package:base':
  
      append, readLines
  
  > 
  > library("R.utils")  # writeDataFrame()
  R.utils v2.12.3 (2023-11-18 01:00:02 UTC) successfully loaded. See ?R.utils for help.
  
  Attaching package: 'R.utils'
  
  The following objects are masked _by_ '.GlobalEnv':
  
      mstr, printf
  
  The following object is masked from 'package:R.filesets':
  
      validate
  
  The following object is masked from 'package:utils':
  
      timestamp
  
  The following objects are masked from 'package:base':
  
      cat, commandArgs, getOption, isOpen, nullfile, parse, use, warnings
  
  > 
  > message("*** A huge TabularTextFile")
  *** A huge TabularTextFile
  > 
  > # Generate a large data frame
  > set.seed(42)
  > n <- 1e5
  > data <- data.frame(
  +   index = seq_len(n),
  +   x = runif(n),
  +   y = rnorm(n),
  +   symbol = sample(letters, size=n, replace=TRUE)
  + )
  > 
  > # Write to tab-delimited file
  > pathname <- tempfile(fileext=".tsv")
  > writeDataFrame(data, file=pathname)
  > 
  > # Setup tabular file
  > db <- TabularTextFile(pathname)
  > print(db)
  TabularTextFile:
  Name: file219b872ba4485
  Tags: 
  Full name: file219b872ba4485
  Pathname: D:/temp/RtmpOOUb9l/file219b872ba4485.tsv
  File size: 4.30 MiB (4505234 bytes)
  Number of data rows: 100000
  Columns [4]: 'index', 'x', 'y', 'symbol'
  Number of text lines: 100006
  > 
  > # Read subset of the rows
  > n <- nbrOfRows(db)
  > data2 <- readDataFrame(db, rows=seq(from=1, to=n, length.out=0.10*n))
  > str(data2)
  'data.frame':	10000 obs. of  4 variables:
   $ index : int  1 11 21 31 41 51 61 71 81 91 ...
   $ x     : num  0.915 0.458 0.904 0.738 0.38 ...
   $ y     : num  0.526 0.614 0.577 -0.483 -0.888 ...
   $ symbol: chr  "s" "e" "j" "f" ...
  > 
  > # Cleanup
  > file.remove(pathname)
  [1] TRUE
  > 
  > source("incl/end.R")
  > 
  > proc.time()
     user  system elapsed 
     7.78   47.29   56.04 
Running the tests in 'tests/TabularTextFile.R' failed.
Complete output:
  > 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 (2024-01-24 05:12:50 UTC) 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 (2024-01-24 17:22:49 UTC) successfully loaded. See ?R.filesets for help.
  
  Attaching package: 'R.filesets'
  
  The following objects are masked from 'package:base':
  
      append, readLines
  
  > 
  > message("*** TabularTextFile")
  *** TabularTextFile
  > 
  > pathA <- system.file("exData", "dataSetA,original", package="R.filesets")
  > pathB <- system.file("exData", "dataSetB", package="R.filesets")
  > 
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > # File #1 - regular tab-delimited file
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > db <- TabularTextFile("fileB,other,tags.dat", path=pathA)
  > print(db)
  TabularTextFile:
  Name: fileB
  Tags: other,tags
  Full name: fileB,other,tags
  Pathname: ../../../../lib/4.4/R.filesets/exData/dataSetA,original/fileB,other,tags.dat
  File size: 108 B (108 bytes)
  Number of data rows: 10
  Columns [4]: 'x', 'y', 'fac', 'char'
  Number of text lines: 11
  > 
  > # Read all data
  > data <- readDataFrame(db, verbose=TRUE)
  Reading TabularTextFile...
   Arguments inferred from file header:
   $header
   [1] TRUE
   
   $colClasses
      x    y  fac char 
     NA   NA   NA   NA 
   
   $skip
   [1] 0
   
   $sep
   [1] "\t"
   
   $quote
   [1] "\""
   
   $fill
   [1] FALSE
   
   $comment.char
   [1] "#"
   
   $check.names
   [1] FALSE
   
   $na.strings
   [1] "---" "NA" 
   
   $stringsAsFactors
   [1] FALSE
   
   Column names (4):
   x, y, fac, char
   Matching column names:...
    Column classes (4):
    NA, NA, NA, NA
   Matching column names:...done
   Pathname: ../../../../lib/4.4/R.filesets/exData/dataSetA,original/fileB,other,tags.dat
   Calling read.table()...
    Arguments used to read tabular file:
    [[1]]
    A connection with                                                                                          
    description "../../../../lib/4.4/R.filesets/exData/dataSetA,original/fileB,other,tags.dat"
    class       "file"                                                                        
    mode        "r"                                                                           
    text        "text"                                                                        
    opened      "opened"                                                                      
    can read    "yes"                                                                         
    can write   "no"                                                                          
    
    $header
    [1] TRUE
    
    $colClasses
    [1] NA NA NA NA
    
    $skip
    [1] 0
    
    $sep
    [1] "\t"
    
    $quote
    [1] "\""
    
    $fill
    [1] FALSE
    
    $comment.char
    [1] "#"
    
    $check.names
    [1] FALSE
    
    $na.strings
    [1] "---" "NA" 
    
    $stringsAsFactors
    [1] FALSE
    
    Raw data read by read.table():
    'data.frame':	10 obs. of  4 variables:
     $ x   : int  1 1 1 1 1 2 2 2 2 3
     $ y   : int  1 2 5 6 10 12 7 43 9 12
     $ fac : chr  "A" "B" "D" "A" ...
     $ char: chr  "r" "b" "g" "q" ...
    Number of rows read: 10
    Number of columns read: 4
    'data.frame':	10 obs. of  4 variables:
     $ x   : int  1 1 1 1 1 2 2 2 2 3
     $ y   : int  1 2 5 6 10 12 7 43 9 12
     $ fac : chr  "A" "B" "D" "A" ...
     $ char: chr  "r" "b" "g" "q" ...
   Calling read.table()...done
  Reading TabularTextFile...done
  > print(data)
     x  y fac char
  1  1  1   A    r
  2  1  2   B    b
  3  1  5   D    g
  4  1  6   A    q
  5  1 10   A    f
  6  2 12   D    a
  7  2  7   E    g
  8  2 43   C    d
  9  2  9   F    g
  10 3 12   A    j
  > 
  > # Read columns
  > dataC <- readColumns(db, verbose=TRUE)
  Reading columns...
   Argument 'columns': 1, 2, 3, 4
   Argument 'colClasses':
   NULL
   Column names': x, y, fac, char
   Column classes:
           ^x$         ^y$       ^fac$      ^char$ 
   "character" "character" "character" "character" 
   Subsetting columns...
    'data.frame':	10 obs. of  4 variables:
     $ x   : chr  "1" "1" "1" "1" ...
     $ y   : chr  "1" "2" "5" "6" ...
     $ fac : chr  "A" "B" "D" "A" ...
     $ char: chr  "r" "b" "g" "q" ...
    Columns to keep: 1, 2, 3, 4
   Subsetting columns...done
  Reading columns...done
  > print(dataC)
     x  y fac char
  1  1  1   A    r
  2  1  2   B    b
  3  1  5   D    g
  4  1  6   A    q
  5  1 10   A    f
  6  2 12   D    a
  7  2  7   E    g
  8  2 43   C    d
  9  2  9   F    g
  10 3 12   A    j
  > 
  > # Extract a particular column by its name
  > dataY <- extractMatrix(db, column="y", colClasses="integer")
  > 
  > # Validate
  > stopifnot(identical(dataY[,1], data$y))
  > 
  > 
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > # File #2 - with header comments
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > db <- TabularTextFile("fileA,20100112.dat", path=pathA)
  > print(db)
  TabularTextFile:
  Name: fileA
  Tags: 20100112
  Full name: fileA,20100112
  Pathname: ../../../../lib/4.4/R.filesets/exData/dataSetA,original/fileA,20100112.dat
  File size: 288 B (288 bytes)
  Number of data rows: 10
  Columns [4]: 'x', 'y', 'fac', 'char'
  Number of text lines: 18
  > 
  > # Read all data
  > data <- readDataFrame(db)
  > print(data)
     x  y fac char
  1  1  1   A    a
  2  1  2   A    b
  3  1  3   B    c
  4  1  4   A    d
  5  1  5   C    e
  6  1  6   A    f
  7  1  7   A    g
  8  1  8   C    h
  9  1  9   C    i
  10 1 10   A    j
  > 
  > # Read columns 'x', 'y', and 'char'
  > data <- readDataFrame(db, colClasses=c("(x|y)"="integer", "char"="character"))
  > print(data)
     x  y char
  1  1  1    a
  2  1  2    b
  3  1  3    c
  4  1  4    d
  5  1  5    e
  6  1  6    f
  7  1  7    g
  8  1  8    h
  9  1  9    i
  10 1 10    j
  > 
  > # Translate column names on the fly
  > db <- setColumnNamesTranslator(db, function(names, ...) toupper(names))
  > data <- readDataFrame(db, colClasses=c("(X|Y)"="integer", "CHAR"="character"))
  > print(data)
     X  Y CHAR
  1  1  1    a
  2  1  2    b
  3  1  3    c
  4  1  4    d
  5  1  5    e
  6  1  6    f
  7  1  7    g
  8  1  8    h
  9  1  9    i
  10 1 10    j
  > 
  > 
  > 
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > # File #3 - column names in header comments
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > db <- TabularTextFile("fileE,headerArgs.dat", path=pathA)
  > print(db)
  TabularTextFile:
  Name: fileE
  Tags: headerArgs
  Full name: fileE,headerArgs
  Pathname: ../../../../lib/4.4/R.filesets/exData/dataSetA,original/fileE,headerArgs.dat
  File size: 201 B (201 bytes)
  Number of data rows: 10
  Columns [3]: 'x', 'y', 'char'
  Number of text lines: 14
  > 
  > # Read all data
  > data <- readDataFrame(db)
  > print(data)
     x  y char
  1  1  1    r
  2  4  3    t
  3  2  7    g
  4  1  6    s
  5  6 10    f
  6  6  2    a
  7  2  4    e
  8  7 24    c
  9  8  1    g
  10 1  2    j
  > 
  > 
  > 
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > # File #4 - with neither column names nor header comments
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > db <- TabularTextFile("fileF,noHeader.dat", path=pathB, columnNames=FALSE)
  > print(db)
  TabularTextFile:
  Name: fileF
  Tags: noHeader
  Full name: fileF,noHeader
  Pathname: ../../../../lib/4.4/R.filesets/exData/dataSetB/fileF,noHeader.dat
  File size: 72 B (72 bytes)
  Number of data rows: 10
  Columns [NA]: <not reading column names>
  Number of text lines: 10
  > 
  > # Read all data
  > data <- readDataFrame(db)
  > print(data)
     V1 V2 V3
  1   1  1  r
  2   4  3  t
  3   2  7  g
  4   1  6  s
  5   6 10  f
  6   6  2  a
  7   2  4  e
  8   7 24  c
  9   8  1  g
  10  1  2  j
  > str(data)
  'data.frame':	10 obs. of  3 variables:
   $ V1: int  1 4 2 1 6 6 2 7 8 1
   $ V2: int  1 3 7 6 10 2 4 24 1 2
   $ V3: chr  "r" "t" "g" "s" ...
  > 
  > # Use column classes
  > colClasses <- rep(NA_character_, times=nbrOfColumns(db))
  > colClasses[length(colClasses)] <- "NULL"
  > data <- readDataFrame(db, colClasses=colClasses)
  > print(data)
     V1 V2
  1   1  1
  2   4  3
  3   2  7
  4   1  6
  5   6 10
  6   6  2
  7   2  4
  8   7 24
  9   8  1
  10  1  2
  > str(data)
  'data.frame':	10 obs. of  2 variables:
   $ V1: int  1 4 2 1 6 6 2 7 8 1
   $ V2: int  1 3 7 6 10 2 4 24 1 2
  > 
  > # Sanity check
  > stopifnot(ncol(data) == nbrOfColumns(db) - 1L)
  > 
  > 
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > # File #5 - with and without newline for the last line
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > df1 <- TabularTextFile("fileG,EOL.txt", path=pathB)
  > print(df1)
  TabularTextFile:
  Name: fileG
  Tags: EOL
  Full name: fileG,EOL
  Pathname: ../../../../lib/4.4/R.filesets/exData/dataSetB/fileG,EOL.txt
  File size: 122 B (122 bytes)
  Number of data rows: 10
  Columns [5]: 'index', 'x', 'y', 'fac', 'char'
  Number of text lines: 11
  > data1 <- readDataFrame(df1)
  > 
  > df2 <- TabularTextFile("fileG,noEOL.txt", path=pathB)
  > print(df2)
  TabularTextFile:
  Name: fileG
  Tags: noEOL
  Full name: fileG,noEOL
  Pathname: ../../../../lib/4.4/R.filesets/exData/dataSetB/fileG,noEOL.txt
  File size: 121 B (121 bytes)
  Number of data rows: 10
  Columns [5]: 'index', 'x', 'y', 'fac', 'char'
  Number of text lines: 11
  > data2 <- readDataFrame(df2)
  > 
  > # Sanity checks
  > stopifnot(identical(data2, data1))
  > 
  > source("incl/end.R")
  > 
  > proc.time()
     user  system elapsed 
     1.98    0.14    2.11 
Running the tests in 'tests/TabularTextFileSet.R' failed.
Complete output:
  > 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 (2024-01-24 05:12:50 UTC) 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 (2024-01-24 17:22:49 UTC) successfully loaded. See ?R.filesets for help.
  
  Attaching package: 'R.filesets'
  
  The following objects are masked from 'package:base':
  
      append, readLines
  
  > 
  > message("*** TabularTextFileSet ...")
  *** TabularTextFileSet ...
  > 
  > # Setup a file set consisting of all *.dat tab-delimited files
  > # in a particular directory
  > pathA <- system.file("exData", "dataSetA,original", package="R.filesets")
  > ds <- TabularTextFileSet$byPath(pathA, pattern="[.]dat$")
  > print(ds)
  TabularTextFileSet:
  Name: dataSetA
  Tags: original
  Full name: dataSetA,original
  Number of files: 5
  Names: fileA, fileB, fileC, fileD, fileE [5]
  Path (to the first file): ../../../../lib/4.4/R.filesets/exData/dataSetA,original
  Total file size: 905 B (905 bytes)
  > 
  > 
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > # Extract one column with a particular name (one per file)
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > # Read column 'y' and a subset of the rows from each of the
  > # tab-delimited files and combine into a matrix
  > rows <- c(3:5, 8, 2)
  > data <- extractMatrix(ds, column="y", colClasses="integer", rows=rows, drop=TRUE)
  > print(data)
       fileA fileB fileC fileD fileE
  [1,]     3     5     6     7     7
  [2,]     4     6     7     6     6
  [3,]     5    10    10    10    10
  [4,]     8    43     4    24    24
  [5,]     2     2     2     3     3
  > 
  > 
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > # Read data frames from each of the files
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > dataList <- lapply(ds, FUN=readDataFrame)
  > print(dataList)
  $`fileA,20100112`
     x  y fac char
  1  1  1   A    a
  2  1  2   A    b
  3  1  3   B    c
  4  1  4   A    d
  5  1  5   C    e
  6  1  6   A    f
  7  1  7   A    g
  8  1  8   C    h
  9  1  9   C    i
  10 1 10   A    j
  
  $`fileB,other,tags`
     x  y fac char
  1  1  1   A    r
  2  1  2   B    b
  3  1  5   D    g
  4  1  6   A    q
  5  1 10   A    f
  6  2 12   D    a
  7  2  7   E    g
  8  2 43   C    d
  9  2  9   F    g
  10 3 12   A    j
  
  $`fileC,inverted`
     x  y fac char
  1  1  3   D    r
  2  2  2   A    b
  3  2  6   D    g
  4  1  7   B    q
  5  3 10   B    f
  6  1  2   B    a
  7  2 24   E    g
  8  1  4   E    d
  9  1  1   G    g
  10 1  2   A    j
  
  $`fileD,3cols`
     x  y char
  1  1  1    r
  2  4  3    t
  3  2  7    g
  4  1  6    s
  5  6 10    f
  6  6  2    a
  7  2  4    e
  8  7 24    c
  9  8  1    g
  10 1  2    j
  
  $`fileE,headerArgs`
     x  y char
  1  1  1    r
  2  4  3    t
  3  2  7    g
  4  1  6    s
  5  6 10    f
  6  6  2    a
  7  2  4    e
  8  7 24    c
  9  8  1    g
  10 1  2    j
  
  > 
  > rows <- c(3:5, 8, 2)
  > dataList <- lapply(ds, FUN=readDataFrame, rows=rows)
  > print(dataList)
  $`fileA,20100112`
    x y fac char
  3 1 3   B    c
  4 1 4   A    d
  5 1 5   C    e
  8 1 8   C    h
  2 1 2   A    b
  
  $`fileB,other,tags`
    x  y fac char
  3 1  5   D    g
  4 1  6   A    q
  5 1 10   A    f
  8 2 43   C    d
  2 1  2   B    b
  
  $`fileC,inverted`
    x  y fac char
  3 2  6   D    g
  4 1  7   B    q
  5 3 10   B    f
  8 1  4   E    d
  2 2  2   A    b
  
  $`fileD,3cols`
    x  y char
  3 2  7    g
  4 1  6    s
  5 6 10    f
  8 7 24    c
  2 4  3    t
  
  $`fileE,headerArgs`
    x  y char
  3 2  7    g
  4 1  6    s
  5 6 10    f
  8 7 24    c
  2 4  3    t
  
  > 
  > 
  > 
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > # Read common columns and stack into one data frame
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > colNames <- Reduce(intersect, lapply(ds, getColumnNames))
  > cat("Common column names:\n")
  Common column names:
  > print(colNames)
  [1] "x"    "y"    "char"
  > 
  > # Read the *common* columns "as is" (hence 'NA')
  > colClasses <- rep(NA, times=length(colNames))
  > names(colClasses) <- colNames
  > cat("Column class patterns:\n")
  Column class patterns:
  > print(colClasses)
     x    y char 
    NA   NA   NA 
  > 
  > data <- readDataFrame(ds, colClasses=colClasses, verbose=TRUE)
  Reading data set as data frame...
   Reading all data files...
    Number of files: 5
   Reading all data files...done
   Combining all data...
   Combining all data...done
  Reading data set as data frame...done
  > print(data)
     x  y char
  1  1  1    a
  2  1  2    b
  3  1  3    c
  4  1  4    d
  5  1  5    e
  6  1  6    f
  7  1  7    g
  8  1  8    h
  9  1  9    i
  10 1 10    j
  11 1  1    r
  12 1  2    b
  13 1  5    g
  14 1  6    q
  15 1 10    f
  16 2 12    a
  17 2  7    g
  18 2 43    d
  19 2  9    g
  20 3 12    j
  21 1  3    r
  22 2  2    b
  23 2  6    g
  24 1  7    q
  25 3 10    f
  26 1  2    a
  27 2 24    g
  28 1  4    d
  29 1  1    g
  30 1  2    j
  31 1  1    r
  32 4  3    t
  33 2  7    g
  34 1  6    s
  35 6 10    f
  36 6  2    a
  37 2  4    e
  38 7 24    c
  39 8  1    g
  40 1  2    j
  41 1  1    r
  42 4  3    t
  43 2  7    g
  44 1  6    s
  45 6 10    f
  46 6  2    a
  47 2  4    e
  48 7 24    c
  49 8  1    g
  50 1  2    j
  > 
  > 
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > # Translate column names on the fly
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > lapply(ds, FUN=setColumnNamesTranslator, function(names, ...) toupper(names))
  $`fileA,20100112`
  TabularTextFile:
  Name: fileA
  Tags: 20100112
  Full name: fileA,20100112
  Pathname: ../../../../lib/4.4/R.filesets/exData/dataSetA,original/fileA,20100112.dat
  File size: 288 B (288 bytes)
  Number of data rows: 10
  Columns [4]: 'X', 'Y', 'FAC', 'CHAR'
  Number of text lines: 18
  
  $`fileB,other,tags`
  TabularTextFile:
  Name: fileB
  Tags: other,tags
  Full name: fileB,other,tags
  Pathname: ../../../../lib/4.4/R.filesets/exData/dataSetA,original/fileB,other,tags.dat
  File size: 108 B (108 bytes)
  Number of data rows: 10
  Columns [4]: 'X', 'Y', 'FAC', 'CHAR'
  Number of text lines: 11
  
  $`fileC,inverted`
  TabularTextFile:
  Name: fileC
  Tags: inverted
  Full name: fileC,inverted
  Pathname: ../../../../lib/4.4/R.filesets/exData/dataSetA,original/fileC,inverted.dat
  File size: 166 B (166 bytes)
  Number of data rows: 10
  Columns [4]: 'X', 'Y', 'FAC', 'CHAR'
  Number of text lines: 13
  
  $`fileD,3cols`
  TabularTextFile:
  Name: fileD
  Tags: 3cols
  Full name: fileD,3cols
  Pathname: ../../../../lib/4.4/R.filesets/exData/dataSetA,original/fileD,3cols.dat
  File size: 142 B (142 bytes)
  Number of data rows: 10
  Columns [3]: 'X', 'Y', 'CHAR'
  Number of text lines: 13
  
  $`fileE,headerArgs`
  TabularTextFile:
  Name: fileE
  Tags: headerArgs
  Full name: fileE,headerArgs
  Pathname: ../../../../lib/4.4/R.filesets/exData/dataSetA,original/fileE,headerArgs.dat
  File size: 201 B (201 bytes)
  Number of data rows: 10
  Columns [3]: 'X', 'Y', 'CHAR'
  Number of text lines: 14
  
  > data <- readDataFrame(ds, colClasses=c("(X|Y)"="integer", "CHAR"="character"))
  > print(data)
     X  Y CHAR
  1  1  1    a
  2  1  2    b
  3  1  3    c
  4  1  4    d
  5  1  5    e
  6  1  6    f
  7  1  7    g
  8  1  8    h
  9  1  9    i
  10 1 10    j
  11 1  1    r
  12 1  2    b
  13 1  5    g
  14 1  6    q
  15 1 10    f
  16 2 12    a
  17 2  7    g
  18 2 43    d
  19 2  9    g
  20 3 12    j
  21 1  3    r
  22 2  2    b
  23 2  6    g
  24 1  7    q
  25 3 10    f
  26 1  2    a
  27 2 24    g
  28 1  4    d
  29 1  1    g
  30 1  2    j
  31 1  1    r
  32 4  3    t
  33 2  7    g
  34 1  6    s
  35 6 10    f
  36 6  2    a
  37 2  4    e
  38 7 24    c
  39 8  1    g
  40 1  2    j
  41 1  1    r
  42 4  3    t
  43 2  7    g
  44 1  6    s
  45 6 10    f
  46 6  2    a
  47 2  4    e
  48 7 24    c
  49 8  1    g
  50 1  2    j
  > 
  > 
  > 
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > # ADVANCED: Translation of fullnames
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > message("- Translation of fullnames")
  - Translation of fullnames
  > 
  > ## Extra sanity checks to troubleshoot stall on CRAN MS Windows servers
  > path <- getPath(ds)
  > cat(sprintf("Data set path: %s\n", sQuote(path)))
  Data set path: '../../../../lib/4.4/R.filesets/exData/dataSetA,original'
  > stopifnot(length(path) > 0)
  > pattern <- ",fullnames[.]txt$"
  > cat(sprintf("Pattern: %s\n", sQuote(path)))
  Pattern: '../../../../lib/4.4/R.filesets/exData/dataSetA,original'
  > files <- dir(pattern = pattern, path = path, full.names = TRUE, all.files = TRUE)
  > cat(sprintf("Data set files [n = %d]:\n", length(files)))
  Data set files [n = 1]:
  > print(files)
  [1] "../../../../lib/4.4/R.filesets/exData/dataSetA,original/all,fullnames.txt"
  > stopifnot(length(files) > 0)
  > 
  > fnts <- TabularTextFileSet$byPath(path, pattern = pattern)
  > print(fnts)
  TabularTextFileSet:
  Name: dataSetA
  Tags: original
  Full name: dataSetA,original
  Number of files: 1
  Names: all [1]
  Path (to the first file): ../../../../lib/4.4/R.filesets/exData/dataSetA,original
  Total file size: 71 B (71 bytes)
  > str(as.list(fnts))
  List of 1
   $ all,fullnames: 'TabularTextFile' Named logi fileA sampleA
    ..- attr(*, ".env")=<environment: 0x000001e37b4c1798> 
  > 
  > cat("Data set before applying fullname translator:\n")
  Data set before applying fullname translator:
  > print(ds)
  TabularTextFileSet:
  Name: dataSetA
  Tags: original
  Full name: dataSetA,original
  Number of files: 5
  Names: fileA, fileB, fileC, fileD, fileE [5]
  Path (to the first file): ../../../../lib/4.4/R.filesets/exData/dataSetA,original
  Total file size: 905 B (905 bytes)
  > appendFullNamesTranslator(ds, as.list(fnts))
  > 
  > cat("Data set after applying fullname translator:\n")
  Data set after applying fullname translator:
  > print(ds)
  TabularTextFileSet:
  Name: dataSetA
  Tags: original
  Full name: dataSetA,original
  Number of files: 5
  Names: sampleA, sampleB, sampleC, fileD, fileE [5]
  Path (to the first file): ../../../../lib/4.4/R.filesets/exData/dataSetA,original
  Total file size: 905 B (905 bytes)
  > 
  > cat("Default fullnames:\n")
  Default fullnames:
  > print(head(getFullNames(ds, translate=FALSE)))
  [1] "fileA,20100112"   "fileB,other,tags" "fileC,inverted"   "fileD,3cols"     
  [5] "fileE,headerArgs"
  > cat("Translated fullnames:\n")
  Translated fullnames:
  > print(head(getFullNames(ds)))
  [1] "sampleA,20100112"       "sampleB,other,tags"     "sampleC,fileC,inverted"
  [4] "fileD,3cols"            "fileE,headerArgs"      
  > 
  > cat("Default fullnames:\n")
  Default fullnames:
  > print(getFullNames(ds, translate=FALSE))
  [1] "fileA,20100112"   "fileB,other,tags" "fileC,inverted"   "fileD,3cols"     
  [5] "fileE,headerArgs"
  > cat("Translated fullnames:\n")
  Translated fullnames:
  > print(getFullNames(ds))
  [1] "sampleA,20100112"       "sampleB,other,tags"     "sampleC,fileC,inverted"
  [4] "fileD,3cols"            "fileE,headerArgs"      
  > 
  > message("*** TabularTextFileSet ... DONE")
  *** TabularTextFileSet ... DONE
  > 
  > source("incl/end.R")
  > 
  > proc.time()
     user  system elapsed 
     3.37    0.39    3.70 
Running the tests in 'tests/fullname.R' failed.
Complete output:
  > 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 (2024-01-24 05:12:50 UTC) 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 (2024-01-24 17:22:49 UTC) successfully loaded. See ?R.filesets for help.
  
  Attaching package: 'R.filesets'
  
  The following objects are masked from 'package:base':
  
      append, readLines
  
  > 
  > message("*** fullname and friends")
  *** fullname and friends
  > 
  > name <- "Name"
  > tags <- c("tag1", "tag2", "tag3")
  > fullname <- paste(c(name, tags), collapse=",")
  > 
  > 
  > message("- fullname()")
  - fullname()
  > fn <- fullname(fullname)
  > print(fn)
  [1] "Name,tag1,tag2,tag3"
  > stopifnot(fn == fullname)
  > 
  > fn <- fullname(name, tags=tags)
  > print(fn)
  [1] "Name,tag1,tag2,tag3"
  > stopifnot(fn == fullname)
  > 
  > fn <- fullname(name, tags=NULL, tags)
  > print(fn)
  [1] "Name,tag1,tag2,tag3"
  > stopifnot(fn == fullname)
  > 
  > fn <- fullname(c(name, tags))
  > print(fn)
  [1] "Name,tag1,tag2,tag3"
  > stopifnot(fn == fullname)
  > 
  > parts <- fullname(name, tags=tags, collapse=FALSE)
  > print(parts)
  [1] "Name" "tag1" "tag2" "tag3"
  > stopifnot(all(parts == c(name, tags)))
  > 
  > parts <- fullname(fullname, collapse=FALSE)
  > print(parts)
  [1] "Name" "tag1" "tag2" "tag3"
  > stopifnot(all(parts == c(name, tags)))
  > 
  > ## Argument 'name' is missing
  > res <- try(fullname(tags=c(name, tags)), silent=TRUE)
  > stopifnot(inherits(res, "try-error"))
  > 
  > 
  > message("- name()")
  - name()
  > n <- name(fullname)
  > print(n)
  [1] "Name"
  > stopifnot(n == name)
  > 
  > n <- name(parts)
  > print(n)
  [1] "Name"
  > stopifnot(n == name)
  > 
  > n <- name(name, tags)
  > print(n)
  [1] "Name"
  > stopifnot(n == name)
  > 
  > n <- name(paste(c(name, tags[-1]), collapse=","))
  > print(n)
  [1] "Name"
  > stopifnot(n == name)
  > 
  > 
  > message("- tags()")
  - tags()
  > ts <- tags(fullname)
  > print(ts)
  [1] "tag1" "tag2" "tag3"
  > stopifnot(all(ts == tags))
  > 
  > ts <- tags(fullname, collapse=TRUE)
  > print(ts)
  [1] "tag1,tag2,tag3"
  > stopifnot(all(ts == paste(tags, collapse=",")))
  > 
  > ts <- tags(parts)
  > print(ts)
  [1] "tag1" "tag2" "tag3"
  > stopifnot(all(ts == tags))
  > 
  > ts <- tags(name, tags)
  > print(ts)
  [1] "tag1" "tag2" "tag3"
  > stopifnot(all(ts == tags))
  > 
  > ts <- tags(paste(c(name, tags[-1]), collapse=","))
  > print(ts)
  [1] "tag2" "tag3"
  > stopifnot(all(ts == tags[-1]))
  > 
  > 
  > message("- dropTags()")
  - dropTags()
  > fn <- dropTags(fullname)
  > print(fn)
  [1] "Name" "tag1" "tag2" "tag3"
  > stopifnot(all(fn == parts))
  > 
  > fn <- dropTags(parts)
  > print(fn)
  [1] "Name" "tag1" "tag2" "tag3"
  > stopifnot(all(fn == parts))
  > 
  > fn <- dropTags(name, tags)
  > print(fn)
  [1] "Name" "tag1" "tag2" "tag3"
  > stopifnot(all(fn == parts))
  > 
  > fn <- dropTags(paste(c(name, tags[-1]), collapse=","))
  > print(fn)
  [1] "Name" "tag2" "tag3"
  > stopifnot(all(fn == c(name, tags[-1])))
  > 
  > fn <- dropTags(fullname, drop=NULL)
  > print(fn)
  [1] "Name" "tag1" "tag2" "tag3"
  > stopifnot(all(fn == parts))
  > 
  > fn <- dropTags(fullname, drop="foo")
  > print(fn)
  [1] "Name" "tag1" "tag2" "tag3"
  > stopifnot(all(fn == parts))
  > 
  > fn <- dropTags(fullname, drop=tags)
  > print(fn)
  [1] "Name"
  > stopifnot(all(fn == parts[1]))
  > 
  > fn <- dropTags(fullname, drop=tags[1])
  > print(fn)
  [1] "Name" "tag2" "tag3"
  > stopifnot(all(fn == parts[-2]))
  > 
  > fn <- dropTags(fullname, drop=name)
  > print(fn)
  [1] "Name" "tag1" "tag2" "tag3"
  > stopifnot(all(fn == parts))
  > 
  > 
  > message("- Arguments$getTags()")
  - Arguments$getTags()
  > library("R.utils")
  R.utils v2.12.3 (2023-11-18 01:00:02 UTC) successfully loaded. See ?R.utils for help.
  
  Attaching package: 'R.utils'
  
  The following objects are masked _by_ '.GlobalEnv':
  
      mstr, printf
  
  The following object is masked from 'package:R.filesets':
  
      validate
  
  The following object is masked from 'package:utils':
  
      timestamp
  
  The following objects are masked from 'package:base':
  
      cat, commandArgs, getOption, isOpen, nullfile, parse, use, warnings
  
  > ts <- Arguments$getTags(NULL)
  > stopifnot(length(ts) == 0, is.null(ts))
  > 
  > ts <- Arguments$getTags(character(0L))
  > stopifnot(length(ts) == 0, is.null(ts))
  > 
  > ts <- Arguments$getTags(NA_character_)
  > stopifnot(length(ts) == 0, is.null(ts))
  > 
  > ts <- Arguments$getTags(tags)
  > print(ts)
  [1] "tag1,tag2,tag3"
  > stopifnot(all.equal(ts, paste(tags, collapse=",")))
  > 
  > ts <- Arguments$getTags(tags, collapse=NULL)
  > print(ts)
  [1] "tag1" "tag2" "tag3"
  > stopifnot(all.equal(ts, tags))
  > 
  > 
  > message("*** fullname and friends ... DONE")
  *** fullname and friends ... DONE
  > 
  > source("incl/end.R")
  > 
  > proc.time()
     user  system elapsed 
     0.37    0.10    0.46