
Read a plain-header CSV meteorological file
read_plain_csv.RdReads a standard CSV file in which the first row is a column header. The
only preprocessing performed is normalising the timestamp column name:
any column whose name matches "timestamp" (case-insensitive) is
renamed to "TIMESTAMP" so that downstream metamet functions can
locate it consistently.
Arguments
- fname
Path to the CSV file.
- ...
Additional arguments forwarded to
data.table::fread, e.g.sep,na.strings.
Value
A data.table with column names exactly as written in the
file header. No renaming is performed; the caller's dt_meta must
use name_dt values that match the actual column names.
Downstream metamet functions (metamet_wide_to_long,
convert_time_char_to_posix) normalise the time column to
TIMESTAMP automatically based on dt_meta.
Details
This reader is the appropriate choice for plain-CSV exports such as EIDC data packages, where there is no multi-row BADC-CSV header and no Campbell TOA5 instrument-info preamble.