Skip to contents

fix_vmode adjust the vmode of a vector to the lowest necessary to save it as ff

Usage

fix_vmode(vec)

Arguments

vec

the vector to be adapted

Value

a vector with the vmode attribute set appropriately

Examples


library(ff)
test <- 1:5
test <- fix_vmode(test)
#> Assigning vmode attribute to nibble...
vmode(test) # "nibble"
#> [1] "nibble"
test <- fix_vmode(test[1:3])
#> Assigning vmode attribute to quad...
vmode(test) # "quad"
#> [1] "quad"