Skip to contents

Converts a data frame to a memory-efficient format by optimizing column types.

Usage

opt_df(df, compress_strings = FALSE, verbose = TRUE)

Arguments

df

Data frame to optimize

compress_strings

Logical, whether to convert character columns to factors

verbose

Logical, whether to print memory savings information

Value

Memory-efficient version of the input data frame