Skip to contents

as.ram2 wrapper for ff:as.ram that also deletes the underlying ff/ffdf to reduce temp space

Usage

as.ram2(obj)

Arguments

obj

ff/ffdf object to be loaded to ram and deleted

Value

a data.table

Examples

library(ff)
#> Loading required package: bit
#> 
#> Attaching package: ‘bit’
#> The following object is masked from ‘package:base’:
#> 
#>     xor
#> Attaching package ff
#> - getOption("fftempdir")=="/tmp/RtmpTnsHkP/ff"
#> - getOption("ffextension")=="ff"
#> - getOption("ffdrop")==TRUE
#> - getOption("fffinonexit")==TRUE
#> - getOption("ffpagesize")==65536
#> - getOption("ffcaching")=="mmnoflush"  -- consider "ffeachflush" if your system stalls on large writes
#> - getOption("ffbatchbytes")==16777216 -- consider a different value for tuning your system
#> - getOption("ffmaxbytes")==536870912 -- consider a different value for tuning your system
#> 
#> Attaching package: ‘ff’
#> The following objects are masked from ‘package:utils’:
#> 
#>     write.csv, write.csv2
#> The following objects are masked from ‘package:base’:
#> 
#>     is.factor, is.ordered
library(tessilake)

test <- ff(1:5)
file.exists(filename(test)) # TRUE
#> [1] TRUE
test.ram <- as.ram2(test)
file.exists(filename(test)) # FALSE
#> [1] FALSE