Getting physical and virtual attributes of ffdf objects
Functions for getting physical and virtual attributes of ffdf objects.
## S3 method for class 'ffdf' physical(x) ## S3 method for class 'ffdf' virtual(x)
x |
an |
ffdf
objects enjoy a complete decoupling of virtual behaviour from physical storage.
The physical component is simply a (potentially named) list where each element represents an atomic ff vector or matrix.
The virtual component is itself a dataframe, each row of which defines a column of the ffdf through a mapping to the physical component.
'physical.ffdf' returns a list
with atomic ff objects.
'virtual.ffdf' returns a data.frame
with the following columns
VirtualVmode |
the |
AsIs |
logical defining the |
VirtualIsMatrix |
logical defining whether this row (=ffdf column) represents a matrix |
PhysicalIsMatrix |
logical reporting whether the corresponding physical element is a matrix |
PhysicalElementNo |
integer identifying the corresponding physical element |
PhysicalFirstCol |
integer identifying the first column of the corresponding physical element (1 if it is not a matrix) |
PhysicalLastCol |
integer identifying the last column of the corresponding physical element (1 if it is not a matrix) |
Jens Oehlschlägel
x <- 1:2 y <- matrix(1:4, 2, 2) z <- matrix(1:4, 2, 2) message("Here the y matrix is first converted to single columns by data.frame, then those columns become ff") d <- as.ffdf(data.frame(x=x, y=y, z=I(z))) physical(d) virtual(d) message("Here the y matrix is first converted to ff, and then stored still as matrix in the ffdf object (although virtually treated as columns of ffdf)") d <- ffdf(x=as.ff(x), y=as.ff(y), z=I(as.ff(z))) physical(d) virtual(d) message("Apply the usual methods extracting physical attributes") lapply(physical(d), filename) lapply(physical(d), vmode) message("And don't confuse with virtual vmode") vmode(d) rm(d); gc()
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.