Getting and setting virtual windows
The virtual window vw
function allows one to define a virtual window into an ff_vector
or ff_array
.
The ff object will behave like a smaller array and it is mapped into the specified region of the complete array.
This allows for example to execute recursive divide and conquer algorithms that work on parts of the full object,
without the need to repeatedly create subfiles.
vw(x, ...) vw(x, ...) <- value ## S3 method for class 'ff' vw(x, ...) ## Default S3 method: vw(x, ...) ## S3 replacement method for class 'ff_vector' vw(x, ...) <- value ## S3 replacement method for class 'ff_array' vw(x, ...) <- value
x |
an |
... |
further arguments (not used) |
value |
a vector or matrix with an Offset, Window and Rest component, see details and examples |
Each dimension of an ff array (or vector) is decomposed into three components, an invisible Offset, a visibe Window and an invisible Rest.
For each dimension the sum of the vw components must match the dimension (or length).
For an ff_vector
, vw
is simply a vector[1:3], for an array is is a matrix[1:3,seq_along(dim(x))]
.
vw
is a virtual
attribute.
NULL or a vw specification, see details
Jens Oehlschlägel
x <- ff(1:26, names=letters) y <- x vw(x) <- c(0, 13, 13) vw(y) <- c(13, 13, 0) x y x[1] <- -1 y[1] <- -2 vw(x) <- NULL x[] z <- ff(1:24, dim=c(4,6), dimnames=list(letters[1:4], LETTERS[1:6])) z vw(z) <- rbind(c(1,1), c(2,4), c(1,1)) z rm(x,y,z); gc()
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.