Skip to contents

This function uses data.table::fread() to read a directory of tabular files of short-term air quality data into R as a data.frame for further analysis in an {mqor} analysis pipeline. Alternatively, users can read a single netCDF file with read_delta_data_cdf().

Usage

read_delta_data_delim(
  path,
  data_type,
  model_name = "MODEL",
  delim = ";",
  pattern = ".csv"
)

Arguments

path

A path to a directory of delimited files, formatted as requested by the DELTA tool.

data_type

One of "obs" or "mod"; used to correctly label the data as being observations or modelled data for later analysis.

model_name

If data_type = "mod", this value will be used to assign a model name to the data.

delim

The delimited used to separate columns in the input files. The default, ;, is prescribed by the DELTA tool.

pattern

Passed to dir() to identify relevant files in path. Also used to clean the file names to attach site names to the data frames.

Value

a tibble