Skip to contents padding-top: 70px;

Functions for reading and writing CSV files that represent an exdf object.

Usage

read.csv.exdf(file, ...)

  write.csv.exdf(x, file, ...)

Arguments

file

The name of the file which the data are to be read from; to be passed to read.csv.

...

Additional arguments to be passed to read.csv or write.csv. Note that some arguments cannot be specified; an error message will be sent if a used attempts to set one of these forbidden arguments.

x

An exdf object to be written to a CSV file.

Details

An exdf object can be written to a CSV file by directly calling write.csv, but this approach causes some column names to be unintentionally modified. For example, any spaces will be replaced by periods. This can potentially cause problems when reloading the data from the CSV file.

Instead, it is preferred to use write.csv.exdf, which will not modify any column names. When writing the CSV file, it is saved with the column names in the first row, the categories in the second row, the units in the third row, and the data in the remaining rows.

The resulting file can be read using read.csv.exdf. Here, the names, categories, and units are read from the first three rows of the specified file, and the data values from the remaining rows. An exdf object is then created from this information.

Examples

# Read a CSV file included with the PhotoGEA package; this file was created
# using `write.csv.exdf`.
licor_file <- read.csv.exdf(
  PhotoGEA_example_file_path('ball_berry_1.csv')
)