read_excel: Read scheme data from Excel file into 'dmdSchemeSet' object

View source: R/read_excel.R

read_excelR Documentation

Read scheme data from Excel file into dmdSchemeSet object

Description

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 spreadsheet file will be kept (as in dmdScheme_example. If FALSE, it will be replaced with one row with NAs as in dmdScheme. Only used when raw == FALSE.

verbose

give verbose progress info. Useful for debugging.

raw

if TRUE the imported spreadsheet file will be returned as an object of class dmdScheme_raw. If FALSE, it will be converted to an dmdScheme object.

validate

if TRUE results are validated using validate(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 to FALSE. 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

fn <- scheme_path_xlsx()
read_excel(
  file = fn
)

read_excel(
  file = fn,
  raw = TRUE
)


dmdScheme documentation built on Aug. 22, 2022, 9:06 a.m.