clone.ff | R Documentation |
clone
physically duplicates ff (and ram) objects and can additionally change some features, e.g. length.
## S3 method for class 'ff'
clone(x
, initdata = x
, length = NULL
, levels = NULL
, ordered = NULL
, dim = NULL
, dimorder = NULL
, bydim = NULL
, symmetric = NULL
, fixdiag = NULL
, names = NULL
, dimnames = NULL
, ramclass = NULL
, ramattribs = NULL
, vmode = NULL
, update = 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
, ...)
x |
|
initdata |
scalar or vector of the |
length |
optional vector |
levels |
optional character vector of levels if (in this case initdata must be composed of these) (default: derive from initdata) |
ordered |
indicate whether the levels are ordered (TRUE) or non-ordered factor (FALSE, default) |
dim |
optional array |
dimorder |
physical layout (default seq_along(dim)), see |
bydim |
dimorder by which to interpret the 'initdata', generalization of the 'byrow' paramter in |
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) |
names |
see |
dimnames |
NOT taken from initdata, see |
ramclass |
class attribute attached when moving all or parts of this ff into ram, see |
ramattribs |
additional attributes attached when moving all or parts of this ff into ram, see |
vmode |
virtual storage mode (default: derive from 'initdata'), see |
update |
set to FALSE to avoid updating with 'initdata' (default TRUE) (used by |
pattern |
root pattern for automatic ff filename creation (default "ff"), see also |
filename |
ff |
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 |
caching |
caching scheme for the backend, currently 'mmnoflush' or 'mmeachflush' (flush mmpages at each swap, default from getOptions("ffcaching") initialized with 'memorymap'), see also |
finalizer |
name of finalizer function called when ff object is |
finonexit |
logical scalar determining whether finalizer is also called when R is closed via |
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 |
BATCHSIZE |
integer scalar limiting the number of elements to be processed in |
BATCHBYTES |
integer scalar limiting the number of bytes to be processed in |
VERBOSE |
set to TRUE for verbosing in |
... |
further arguments to the generic |
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.
an ff or ram object
Jens Oehlschlägel
ff
, update
, as.ram
, as.ff
x <- ff(letters, levels=letters)
y <- clone(x, length=52)
rm(x,y); gc()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.