Description Usage Arguments Value Parsing data Creating a configList Examples
View source: R/generic_parseData.R
Given a string of delimited file data, this function will parse the file as a table of data an apply some transformations and augmentations as specified by a given configuration list.
1 | generic_parseData(fileString = NULL, configList = NULL)
|
fileString |
Character string of delimited data to parse. |
configList |
A |
A tibble of the data contined in fileString
parsed according
to parameters in configList
. The data is coerced into a format that
is more easily convertable into a ws_monitor
object at a later
point.
Internally, this function uses read_delim
to convert
fileString
into a tibble. If any lines of data cannot be properly
parsed, and error will be thrown anf the problem lines will be printed.
For more information on how to build a configList
, see the Rmarkdown
document "Working with Generic Data" in the localNotebooks
directory.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | filePath <- system.file(
"extdata", "generic_data_example.csv",
package = "PWFSLSmoke",
mustWork = TRUE
)
configPath <- system.file(
"extdata", "generic_configList_example.json",
package = "PWFSLSmoke",
mustWork = TRUE
)
configList <- jsonlite::fromJSON(configPath)
fileString <- generic_downloadData(filePath)
parsedData <- generic_parseData(fileString, configList)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.