read_csv | R Documentation |
read_csv
reads a csv file assigning column names and
column types according to the specifications in an xml file.
read_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 a data.table
with the contents of the csv file.
rootPath <- file.path(system.file(package = "simutils"), "extdata") # simulation file csv_fn <- file.path(rootPath, "output_files", "antennas.csv") xml_fn <- file.path(rootPath, "metadata/output_files", "antennas_dict.xml") dt <- read_csv(xml_fn, csv_fn) str(dt) # coverage file csv_fn <- file.path(rootPath, "output_files", "AntennaCells_MNO1.csv") xml_fn <- file.path(rootPath, "metadata/output_files", "antennaCells_dict.xml") dt <- read_csv(xml_fn, csv_fn) str(dt)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.