Skip to contents

This function reads a CSV file and performs several cleaning steps:

  1. Optionally converts column names to uppercase using janitor::clean_names.

  2. Attempts to parse character columns as dates in ymd format.

  3. Optionally converts character columns to uppercase if not parsed as dates.

Usage

read_raw_data(file, col_caps = TRUE, str_caps = TRUE)

Arguments

file

A string specifying the path to the CSV file to be read.

col_caps

Logical. Whether to convert column names to uppercase. Default is TRUE.

str_caps

Logical. Whether to convert string column values to uppercase. Default is TRUE.

Value

A data frame with cleaned column names and data.