load_uba_data_from_dir: Load UBA Data from Directory

View source: R/data_loading.R

load_uba_data_from_dirR Documentation

Load UBA Data from Directory

Description

This function loads data from CSV files in the specified directory. It supports two formats:

Usage

load_uba_data_from_dir(data_dir)

Arguments

data_dir

Character. Path to the directory containing .csv files.

Details

  1. "inv": Files must contain the following columns:

    • Station, Komponente, Datum, Uhrzeit, Wert.

  2. "24Spalten": Files must contain:

    • Station, Komponente, Datum, and columns Wert01, ..., Wert24.

File names should include "inv" or "24Spalten" to indicate their format. The function scans recursively for .csv files in subdirectories and combines the data into a single data.table in long format. Files that are not in the exected format will be ignored.

Value

A data.table containing the loaded data in long format. Returns an error if no valid files are found or the resulting dataset is empty.


ubair documentation built on April 12, 2025, 2:12 a.m.