The csvy R package version 0.3.0 provides functions to import and export CSV data with YAML metadata headers (CSVY format).
The csvy package implements the CSVY file format, which places a YAML header on top of a regular CSV file to combine CSV simplicity with rich metadata. It offers two main functions, write_csvy and read_csvy, for exporting and importing data frames with embedded or external metadata.
Additional utilities include get_yaml_header to retrieve the YAML header from a file, read_metadata and write_metadata for handling external YAML or JSON metadata files, and colclass_dict as a dictionary of column classes for reading data. The package depends on data.table, jsonlite, and yaml, and is licensed under GPL-2.
| Version | 0.3.0 |
|---|---|
| License | GPL-2 |
| Imports | tools, data.table, jsonlite, yaml |
| Suggests | testthat, datasets |
| Maintainer | Thomas J. Leeper |
| Repository | CRAN |
| URL | https://github.com/leeper/csvy |
Use read_csvy(file) to import CSVY data as a data.frame, with optional metadata file and detection arguments.
Use write_csvy(x, file) to export a data.frame to CSVY, with options for separator, decimal, and header commenting.