View source: R/read_flexfile.R
read_flexfile | R Documentation |
read_flexfile()
returns a list of tibbles from a zip folder submission of the FlexFiles.
Each tibble corresponds to its respective JSON table. This function can read both a FlexFile
and a Quantity report.
read_flexfile_3part()
reads the Excel 3-Part Template into the same structure
as from the JSON.
read_flexfile(
file,
.show_check = FALSE,
.coerce_spec = TRUE,
.drop_optional = TRUE,
.warn_utf8_bom = FALSE,
.data_case = c("native", "snake")
)
read_flexfile_3part(
file,
.show_check = FALSE,
.coerce_spec = TRUE,
.drop_optional = TRUE
)
file |
Path to a FlexFile or Quantity Report .zip archive. For the 3-Part Template, a character vector of the three Excel files to read. |
.show_check |
Logical whether to print information about the file check to the console or not. |
.coerce_spec |
Logical whether to coerce all column data types to those from the data models.
If |
.drop_optional |
Logical whether to drop optional columns or not. |
.warn_utf8_bom |
Logical whether to report UTF8 byte-order-mark errors. |
.data_case |
Either 'native' or 'snake'. Controls if the names of the tables and columns reflect the native data model or the transformed snake_case. The default option was changed from snake to native in readflexfile v0.5.0 to simplify usage of readflexfile. |
Can be used with read_folder
as in example.
A list of tibbles for the file
. Result will be either of class flexfile
or
of class quantityreport
.
flexfile_class, quantityreport_class
## Not run:
# Read in one FlexFile
file <- system.file("extdata", "Sample_FlexFile_A.zip", package = "flexample")
flexfile <- read_flexfile(file)
# Read in multiple FlexFiles by using read_folder
folder <- system.file("extdata", package = "flexample")
flexfiles <- read_folder(folder, read_flexfile)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.