format_data: format_data()

Description Usage Arguments Value Examples

View source: R/format_data.R

Description

This function conducts basic data cleaning tasks on a data frame.

Usage

1
2
format_data(data, to_date = c("start$|^start|end$|^end|date"),
  to_numeric = c("id$|days|time|weight|wage"))

Arguments

data

dataframe: a dataframe containing.

to_date

character vector: Names of columns to be converted to date format.

to_numeric

character vector: Names of columns to be converted to numeric format.

Value

dataframe

Examples

1
2
enroll <- laycUtils::load_txt('./my_data_folder/enrollment.txt')
format_data(data = enroll)

thelayc/laycUtils documentation built on May 27, 2017, 5:30 a.m.