flatten_data.flexfile() creates a single flat file for working with FlexFile
data. Input should be a list of one or more FlexFiles imported through the read_flexfile function.
All fields retain their original names from the data model unless they are added in the flattening process. These
new fields are in 'snake_case' rather than ProperCase.
# S3 method for class 'flexfile'
flatten_data(x, .allocate = TRUE, ...)if (FALSE) { # \dontrun{
# Flatten one FlexFile
file <- system.file("extdata", "Sample_FlexFile_A.zip", package = "flexample")
flat_flex_file <- read_flexfile(file) %>%
flatten_data()
# Flatten multiple FlexFiles
library(dplyr)
files <- system.file("extdata", package = "flexample")
flat_flexfiles <- read_folder(files, read_flexfile) %>%
flatten_data()
bind_rows(.id = "doc_id")
} # }