clean_by_id: Remove rows where id columns are all missing, and rows where...

clean_by_idR Documentation

Remove rows where id columns are all missing, and rows where all columns but the id columns are missing; (optional) Remove columns where all rows are of missing values.

Description

Remove rows where id columns are all missing, and rows where all columns but the id columns are missing; (optional) Remove columns where all rows are of missing values.

Usage

clean_by_id(df, id_col, var_col = NULL, filter_col = FALSE, th = 1)

Arguments

id_col

numeric vector specify which columns are considered id columns

var_col

numeric vector specify which columns are considered data columns

filter_col

a bool, if TRUE then will leave only columns that does not contain missing - applies to all non id columns if var_col is NULL otherwise only applies to var_col only.

th

a numeric, range from 0-1 to specify the threshold for amount least amount of non-missing data by column in fractions of total rows


fjoe88/d8ahelper documentation built on Feb. 6, 2023, 7:55 a.m.