Read Aqua-Troll Data File
TROLL_read_data.RdReads a raw TROLL data file and automatically locates the header row containing `"Date Time"`. The function validates that the timestamp column exists and ensures that timestamps include **second-level resolution**. Supported timestamp formats are `"ymd HMS"` and `"mdy HMS"`.
Details
The function performs several validation checks:
Confirms the file exists at the specified path.
Searches the file for the row containing `"Date Time"` to identify the start of the data table.
Ensures exactly one header row containing `"Date Time"` exists.
Imports the data using
readr::read_csv()starting from the detected header row.Verifies that timestamps in the `"Date Time"` column include seconds.
If timestamps contain only minute resolution (e.g., `"ymd HM"` or `"mdy HM"`), the function will error.