Learn R Programming

R.filesets (version 2.15.1)

dsApplyInPairs.GenericDataFileSet: Applies a function to each pair of file in two file sets

Description

Applies a function to each pair of file in two file sets.

Usage

# S3 method for GenericDataFileSet
dsApplyInPairs(ds1, ds2, FUN, ..., args=list(), skip=FALSE, verbose=FALSE,
  .parallel=NULL, .control=NULL)

Value

Returns a list.

Arguments

ds1, ds2

GenericDataFileSet:s.

FUN

A function.

...

Arguments passed to FUN.

args

(optional) A named list of additional arguments passed to FUN.

skip

If TRUE, already processed files are skipped.

verbose

See Verbose.

Author

Henrik Bengtsson

Details

WARNING: dsApplyInPairs() is defunct; instead use future.apply::future_mapply().

Examples

Run this code
if (FALSE) {

# - - - - - - - - - - - - - - - - - - - - - - - -
# Setting up a file set
# - - - - - - - - - - - - - - - - - - - - - - - -
path <- system.file(package="R.filesets")
ds <- GenericDataFileSet$byPath(path)


# - - - - - - - - - - - - - - - - - - - - - - - -
# Get the size of each file
# - - - - - - - - - - - - - - - - - - - - - - - -
sizes <- lapply(ds, FUN=getFileSize)
str(sizes)

}

Run the code above in your browser using DataLab