Learn R Programming

climatehealth (version 1.0.0)

reformat_data: Reformat a dataframe using various different cleaning techniques.

Description

Take a dataframe, and apply various different cleaning methods to it in order to prepare the data for use with a climate indicator.

Usage

reformat_data(df, reformat_date = TRUE, fill_na = c(), year_from_date = TRUE)

Value

The cleaned/reformatted data frame.

Arguments

df

The dataframe to apply cleaning/reformatting to.

reformat_date

Whether or not to reformat the data to the Date datatype.

fill_na

A vector of column names to fill NA values in (fills with 0).

year_from_date

Derive a new column 'year' from the date column.