Close frees the Memory Mapping resources and closes the ff file without deleting the file data.

# S3 method for class 'ff'
close(con, ...)
# S3 method for class 'ffdf'
close(con, ...)
# S3 method for class 'ff_pointer'
close(con, ...)

Arguments

con

an open ff object

...

...

Details

The ff_pointer method is not intended for manual use, it is used at finalizer dispatch time. Closing ffdf objects will close all of their physical components including their row.names if they are is.ff

Value

TRUE if the file could be closed, FALSE if it was closed already (or NA if not all components of an ffdf returned FALSE or TRUE on closing)

Author

Jens Oehlschlägel

Examples

  x <- ff(1:12)
  close(x)
#> [1] TRUE
  x
#> ff (closed) integer length=12 (12)
  open(x)
#> [1] TRUE
  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 
  rm(x); gc()
#>           used (Mb) gc trigger  (Mb) max used  (Mb)
#> Ncells 1135532 60.7    1994352 106.6  1994352 106.6
#> Vcells 2105272 16.1    8388608  64.0  3981144  30.4