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

dsApplyInPairs.GenericDataFileSetR Documentation

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 class 'GenericDataFileSet'
dsApplyInPairs(ds1, ds2, FUN, ..., args=list(), skip=FALSE, verbose=FALSE,
  .parallel=NULL, .control=NULL)

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.

Details

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

Value

Returns a list.

Author(s)

Henrik Bengtsson

Examples

## Not run: 

# - - - - - - - - - - - - - - - - - - - - - - - -
# 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)


## End(Not run)

R.filesets documentation built on May 29, 2024, 9:10 a.m.