read_cr3000: Reading a CR3000 data file

View source: R/read_cr3000.R

read_cr3000R Documentation

Reading a CR3000 data file

Description

Tool for reading output files created by Campbell Scientific CR3000 data loggers and storing their contents in exdf objects.

Usage

  read_cr3000(
    file_name,
    rows_to_skip = 1,
    variable_name_row = 2,
    variable_unit_row = 3,
    data_start_row = 5,
    ...
  )

Arguments

file_name

A relative or absolute path to a .dat file containing TDL data.

rows_to_skip

The number of rows to skip at the beginning of the file; the first row in a TDL file typically has fewer columns than the others, which causes problems when storing it as a table.

variable_name_row

The row number in the TDL file containing the names of the variables (RECORD, Conc12C_Avg, etc).

variable_unit_row

The row number in the TDL file containing the units of the variables (ppm, V, etc).

data_start_row

The first row number of the table containing the measured data.

...

Additional arguments to be passed to read.csv.

Value

An exdf object that fully includes all the data from the CR3000 output file. In addition to the elements described in the documentation for read_gasex_file, the following "extra" elements are also included:

  • rows_to_skip: A copy of the input argument with the same name

  • variable_name_row: A copy of the input argument with the same name.

  • variable_unit_row: A copy of the input argument with the same name.

  • data_start_row: A copy of the input argument with the same name.

See Also

read_gasex_file

Examples

# Example: reading a TDL file that is included with the PhotoGEA package.
tdl_file <- read_cr3000(
  PhotoGEA_example_file_path('tdl_sampling_1.dat')
)

tdl_file$file_name # A record of where the data came from
str(tdl_file)      # View the contents of the exdf object's main_data

PhotoGEA documentation built on April 11, 2025, 5:48 p.m.