clone {ff}R Documentation

Cloning ff and ram objetcs

Description

clone physically duplicates ff (and ram) objects and can additionally change some features, e.g. length.

Usage

clone(x, ...)
## S3 method for class 'ff':
clone(x, initdata = x, length = NULL, dim = NULL, dimorder = NULL, bydim = NULL, symmetric = NULL, fixdiag = NULL, dimnames = NULL, vmode = NULL, pattern = NULL, filename = NULL, overwrite = FALSE, pagesize = NULL, caching = NULL, finalizer = NULL, finonexit = NULL, FF_RETURN = NULL, BATCHSIZE = .Machine$integer.max, BATCHBYTES = getOption("ffbatchbytes"), VERBOSE = FALSE, ...)
## Default S3 method:
clone(x, ...)

Arguments

x x
initdata scalar or vector of the .vimplemented vmodes, recycled if needed, default 0, see also as.vmode and vector.vmode
length optional vector length of the object (default: derive from 'initdata' or 'dim'), see length.ff
dim optional array dim, see dim.ff and array
dimorder physical layout (default 1:length(dim)), see dimorder and aperm
bydim dimorder by which to interpret the 'initdata', generalization of the 'byrow' paramter in matrix
symmetric extended feature: TRUE creates symmetric matrix (default FALSE)
fixdiag extended feature: non-NULL scalar requires fixed diagonal for symmetric matrix (default NULL is free diagonal)
dimnames NOT taken from initdata, see dimnames
vmode virtual storage mode (default: derive from 'initdata'), see vmode and as.vmode
pattern root pattern for automatic ff filename creation (default "ff"), see also physical
filename ff filename (default tmpfile with 'pattern' prefix), see also physical
overwrite set to TRUE to allow overwriting existing files (default FALSE)
pagesize pagesize in bytes for the memory mapping (default from getOptions("ffpagesize") initialized by getdefaultpagesize), see also physical
caching caching scheme for the backend, currently 'mmnoflush' or 'mmeachflush' (flush mmpages at each swap, default from getOptions("ffcaching") initialized with 'memorymap'), see also physical
finalizer name of finalizer function called when ff object is removed, (default "deleteIfOpen" from getOptions("fffinalizer"))), standard finalizers are close.ff, delete.ff and deleteIfOpen.ff, see also reg.finalizer
finonexit logical scalar determining whether finalizer is also called when R is closed via q, (default TRUE from getOptions("fffinonexit"))
FF_RETURN logical scalar or ff object to be used. The default NULL creates a ff or ram clone, TRUE returns a ff clone, FALSE returns a ram clone. Handing over an ff object here uses this or stops if not ffsuitable
BATCHSIZE integer scalar limiting the number of elements to be processed in update.ff when length(initdata)>1, default from getOption("ffbatchsize")
BATCHBYTES integer scalar limiting the number of bytes to be processed in update.ff when length(initdata)>1, default from getOption("ffbatchbytes"), see also .rambytes
VERBOSE set to TRUE for verbosing in update.ff when length(initdata)>1, default FALSE
... further arguments to the generic

Details

clone is generic. clone.ff is the workhorse behind as.ram and as.ff. For creating the desired object it calls ff which calls update for initialization. clone.default is currently a simply wrapper to clone.ff, which will add some ff attributes also when cloning ram objects.

Value

an ff or ram object

Author(s)

Jens Oehlschlägel

See Also

ff, update, as.ram, as.ff

Examples

  x <- ff(letters, levels=letters)
  y <- clone(x, length=52)

[Package ff version 2.0.0 Index]