read_excel
Read scheme data from Excel file into dmdSchemeSet
object
Reads the data from an Excel file. Validation of the scheme version and
scheme name is always done. Additional validations are done depending on the
arguments validate
. See detals below.
Usage
read_excel(
file,
keepData = TRUE,
verbose = FALSE,
raw = FALSE,
validate = TRUE
)
Arguments
- file
the name of the Excel file (.xls or .xlsx) containing the data to be read.
- keepData
if
TRUE
, the data in the spreadsheetfile
will be kept (as indmdScheme_example
. IfFALSE
, it will be replaced with one row with NAs as indmdScheme
. Only used whenraw == FALSE
.- verbose
give verbose progress info. Useful for debugging.
- raw
if
TRUE
the imported spreadsheetfile
will be returned as an object of classdmdScheme_raw
. IfFALSE
, it will be converted to andmdScheme
object.- validate
if
TRUE
results are validated usingvalidate(validateData = FALSE, errorIfStructFalse = TRUE )
.Consequently, an error is raised if the resulting scheme can not be successfully validated against the one in the package. There are not many cases where you want to change this value toFALSE
. But if you do, the result will not be validated. This can lead to invalid schemes!.
Value
either if raw = TRUE
a list of data.frames from the worksheets of
Class dmdScheme_raw
, otherwise an object of class
dmdSchemeSet
Examples
# NOT RUN {
fn <- scheme_path_xlsx()
read_excel(
file = fn
)
read_excel(
file = fn,
raw = TRUE
)
# }