Opening an ff file
open.ff.rdopen.ff opens an ff file, optionally marking it readonly and optionally specifying a caching scheme.
Arguments
- con
- readonly
readonly- pagesize
number of bytes to use as pagesize or NULL to take the pagesize stored in the
physicalattribute of the ff object, seegetalignedpagesize- caching
one of 'mmnoflush' or 'mmeachflush', see
ff- assert
setting this to TRUE will give a message if the ff was not open already
- ...
further arguments (not used)
Details
ff objects will be opened automatically when accessing their content and the file is still closed.
Opening ffdf objects will open all of their physical components including their row.names if they are is.ff
Value
TRUE if object could be opened, FALSE if it was opened already (or NA if not all components of an ffdf returned FALSE or TRUE on opening)
Examples
x <- ff(1:12)
close(x)
#> [1] TRUE
is.open(x)
#> [1] FALSE
open(x)
#> [1] TRUE
is.open(x)
#> [1] TRUE
close(x)
#> [1] TRUE
is.open(x)
#> [1] FALSE
x[]
#> opening ff /tmp/RtmpJwybJa/ff/ffad39a107b61.ff
#> [1] 1 2 3 4 5 6 7 8 9 10 11 12
is.open(x)
#> [1] TRUE
y <- x
close(y)
#> [1] TRUE
is.open(x)
#> [1] FALSE
rm(x,y); gc()
#> used (Mb) gc trigger (Mb) max used (Mb)
#> Ncells 1252392 66.9 2239654 119.7 2239654 119.7
#> Vcells 2306545 17.6 8388608 64.0 8387257 64.0