This function takes a folder path, reads all CSV files in the folder that match the pattern "*results.csv",
and merges them into a single data frame. It keeps only the relevant columns: file_name
, sensor_id
, datetime
,
date
, hour
, index
, and value_avg
.
Usage
merge_index_results(folder_path)
Arguments
- folder_path
A character string specifying the folder containing the CSV files to be merged.
Value
A data frame with the merged contents of the CSV files, containing only the specified columns.
Examples
if (FALSE) { # \dontrun{
# Merge CSV files in the specified folder
merged_data <- merge_index_results("/path/to/csv/folder")
} # }