Getting and setting physical and virtual attributes of ff objects
physical.ff.rdFunctions for getting and setting physical and virtual attributes of ff objects.
Usage
# S3 method for class 'ff'
physical(x)
# S3 method for class 'ff'
virtual(x)
# S3 method for class 'ff'
physical(x) <- value
# S3 method for class 'ff'
virtual(x) <- valueDetails
ff objects have physical and virtual attributes, which have different copying semantics:
physical attributes are shared between copies of ff objects while virtual attributes might differ between copies.
as.ram will retain some physical and virtual atrributes in the ram clone,
such that as.ff can restore an ff object with the same attributes.
See also
physical.ff, physical.ffdf, ff, as.ram; is.sorted and na.count for applications of physical attributes; levels.ff and ramattribs for applications of virtual attributes
Examples
x <- ff(1:12)
x
#> ff (open) integer length=12 (12)
#> [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]
#> 1 2 3 4 5 6 : 7 8 9 10 11 12
physical(x)
#> $vmode
#> [1] "integer"
#>
#> $maxlength
#> [1] 12
#>
#> $pattern
#> [1] "ff"
#>
#> $filename
#> [1] "/tmp/RtmpJwybJa/ff/ffad393503ba33.ff"
#>
#> $pagesize
#> [1] 65536
#>
#> $finalizer
#> [1] "delete"
#>
#> $finonexit
#> [1] TRUE
#>
#> $readonly
#> [1] FALSE
#>
#> $caching
#> [1] "mmnoflush"
#>
virtual(x)
#> $Length
#> [1] 12
#>
#> $Symmetric
#> [1] FALSE
#>
y <- as.ram(x)
physical(y)
#> $pattern
#> [1] "ff"
#>
#> $filename
#> [1] "/tmp/RtmpJwybJa/ff/ffad393503ba33.ff"
#>
#> $pagesize
#> [1] 65536
#>
#> $finalizer
#> [1] "delete"
#>
#> $finonexit
#> [1] TRUE
#>
#> $caching
#> [1] "mmnoflush"
#>
virtual(y)
#> named list()
rm(x,y); gc()
#> used (Mb) gc trigger (Mb) max used (Mb)
#> Ncells 1252466 66.9 2239654 119.7 2239654 119.7
#> Vcells 2306750 17.6 8388608 64.0 8387257 64.0