| getset.ff {ff} | R Documentation |
The three functions get.ff, set.ff and getset.ff provide the simplest interface to access an ff file: getting and setting single values
get.ff(x, i) set.ff(x, i, value, add = FALSE) getset.ff(x, i, value, add = FALSE)
x |
an ff object |
i |
an index position within the ff file |
value |
the value to write to position i |
add |
TRUE if the value should rather increment than overwrite at the index position |
getset.ff combines the effects of get.ff and set.ff in a single operation: it retrieves the old value at position i before changing it.
getset.ff will maintain na.count.
get.ff returns a single value, set.ff returns the 'changed' ff object (like all assignment functions do) and getset.ff returns the value at the position.
More precisely getset.ff(x, i, value, add=FALSE) returns the old value at the position i while getset.ff(x, i, value, add=TRUE) returns the incremented value of x.
get.ff, set.ff and getset.ff are low level functions that do not support ramclass and ramattribs and thus will not give the expected result with factor and POSIXct
Jens Oehlschlägel
readwrite.ff for low-level vector access and [.ff for high-level access
x <- ff(0, length=12) get.ff(x, 3L) set.ff(x, 3L, 1) x set.ff(x, 3L, 1, add=TRUE) x getset.ff(x, 3L, 1, add=TRUE) getset.ff(x, 3L, 1) x delete(x) rm(x)