Learn R Programming

hdf5r (version 1.3.11)

flatten_df: Flatten a nested data.frame

Description

Flatten a nested data.frame

Usage

flatten_df(df, factor_ext_to_char = FALSE)

Value

A flattened data.frame

Arguments

df

The data.frame to flatten

factor_ext_to_char

Should extended factor variables be converted to characters (mainly for easy printing)

Author

Holger Hoefling

Details

HDF5 Compounds allow for nesting. Correspondingly, nested data.frames are being produced. This function flattens such a nested data.frame.

For easier printing to the screen, it also allows for coercion of factor_ext to character variables.