update.ff {ff}R Documentation

Update ff content from another object

Description

update copies updates one ff object with the content of another object.

Usage

update.ff(object, from, delete = FALSE, bydim = NULL, fromdim = NULL, BATCHSIZE = .Machine$integer.max, BATCHBYTES = getOption("ffbatchbytes"), VERBOSE = FALSE, ...)

Arguments

object an ff object to which to update
from an object from which to uodate
delete TRUE to delete the 'from' object after the update, can speed up updating significantly
bydim how to interpret the content of the object, see ff
fromdim how to interpret the content of the 'from' object, see ff
BATCHSIZE BATCHSIZE
BATCHBYTES BATCHBYTES
VERBOSE VERBOSE
... further arguments

Details

If the source object is.ff and delete=TRUE then instead of slow copying we swap and rename the files behind the ff objects.

Value

a copy of the input ff object

Author(s)

Jens Oehlschlägel

See Also

ff, clone, ffvecapply, vectorCompatible

Examples

  x <- ff(1:100)
  y <- ff(-(1:100))
  filename(x)
  filename(y)
  update(x, from=y)
  update(x, from=y, delete=TRUE)
  filename(x)
  x

  ## Not run: 
    cat("timings\n")
    x <- ff(1:10000000)
    y <- ff(-(1:10000000))
    system.time(update(x, from=y))
    system.time(update(x, from=y, delete=TRUE))
  
## End(Not run)


[Package ff version 2.0.0 Index]