Description Usage Arguments Value Examples
The function will read four types of csv files.
The input file is in the format produced by write_meta_template(...,embedded = TRUE), which has metadata embedded at the top of the file above the data table. File names are typically in the format "fileName_withMeta.csv"
Metadata is stored in an external metadata file located in the same folder as the data file. The function call is to the data file (e.g. read_meta("dataFile.csv")). The function then will read in any metadata located in a file in same folder named "dataFile_meta.csv".
If there is no "dataFile_meta.csv" file associated with the data file located in the folder, the function will read in the data table only and issue a warning that there are no metadata.
If the call is to a "dataFile_meta.csv" metadata file, the function will read in the metadata and issue a warning that there is no data table included in the file. Note that "dataFile.csv" may in fact exist, but the function will not bother to look for it.
1 |
file |
Path and name of the .csv data file to read. |
List with three data frames
General metadata with attribute and value
Table of metadata for each dataset variable
The dataset
1 2 | iris_withMeta_raw <- read.csv(system.file("iris_withMeta.csv", package = "metacsv" ))
iris_withMeta_parsed <- read_meta(system.file("iris_withMeta.csv", package = "metacsv" ))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.