clean: Cleaning function

Description Usage Arguments Value Examples

Description

Data is cleanedd

Usage

1
clean(df, id_var, na_threshold = 0.9, ...)

Arguments

df

data.frame, data to be cleaned

id_var

character, columnname of dataframe which acts as the ID variable

na_threshold

numeric, if NAs within a column are greater than the treshold given, this columns will be excluded

...

args forwarded to read_csv2. Hint: You can edit the import column type by the col_types argument.

Value

data.frame, excluding columns with too many NAs and impute existing NAs in numeric fields with zero

Examples

1
2
3
4
## Not run: 
clean(CompanyData2018, id_var = "ID")

## End(Not run)

pmaletic/KYuC documentation built on June 22, 2019, 6:34 p.m.