validate_csv | R Documentation |
validate_csv
validates a csv file using an xml file as
schema, i.e. specifying its column names and value ranges (not yet
implemented).
validate_csv(xmlFileName, csvFileName)
xmlFileName |
File name of the xml file containing the schema for the csv file. |
csvFileName |
File name of the csv file to validate. |
Return TRUE
if the csv file is validated, otherwise, it
returns FALSE
.
rootPath <- file.path(system.file(package = "simutils"), "extdata") # antennas file csv_fn <- file.path(rootPath, "output_files", "antennas.csv") xml_fn <- file.path(rootPath, "metadata/output_files", "antennas_dict.xml") validate_csv(xml_fn, csv_fn) # antennacells_mno1 file csv_fn <- file.path(rootPath, "output_files", "AntennaCells_MNO1.csv") xml_fn <- file.path(rootPath, "metadata/output_files", "antennaCells_dict.xml") validate_csv(xml_fn, csv_fn) # antennainfo_mno_mno1 file csv_fn <- file.path(rootPath, "output_files", "AntennaInfo_MNO_MNO1.csv") xml_fn <- file.path(rootPath, "metadata/output_files", "events_dict.xml") validate_csv(xml_fn, csv_fn) # grid file csv_fn <- file.path(rootPath, "output_files", "grid.csv") xml_fn <- file.path(rootPath, "metadata/output_files", "grid_dict.xml") validate_csv(xml_fn, csv_fn) # Column names Tile ID, Mobile Phone(s) ID are not valid column name # persons file csv_fn <- file.path(rootPath, "output_files", "persons.csv") xml_fn <- file.path(rootPath, "metadata/output_files", "persons_dict.xml") validate_csv(xml_fn, csv_fn) # signalmeasure_mno1 file csv_fn <- file.path(rootPath, "output_files", "SignalMeasure_MNO1.csv") xml_fn <- file.path(rootPath, "metadata/output_files", "SignalMeasure_dict.xml") validate_csv(xml_fn, csv_fn)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.