Description Usage Arguments Functions
Functions to help with Data Cleaning
1 2 3 4 5 6 7 8 9 10 11 12 | CleanCols(DT)
CleanRows(DT, cols = NULL, index = FALSE)
ddup(DT, cols = NULL, verbose = TRUE)
Booleanize(DT = NULL, cols = NULL, value = NULL, not = FALSE)
RoundCols(DT, digits = 2, igncols = NULL, cols = NULL, b_skip = FALSE,
b_copy = TRUE)
p_setcolorder(DT, cols = NULL, aslast = TRUE, verbose = FALSE)
|
DT |
A data table to operate on |
cols |
columns of a data.table to focus the operation on |
index |
In the case of |
verbose |
A boolean indicating whether to print information on the console |
value |
In the case of booleanize, a value to look for throughout the table |
not |
A boolean. Negates the output of |
digits |
A numeric indicating the number of digits to round in |
igncols |
A character vector indicating which columns to ignore |
b_skip |
A boolean indicating whether to skip non-numeric columns that |
b_copy |
A boolean indicating whether to make a copy of the data, or operate on by reference |
aslast |
A boolean indicating whether arrange the non-order columns before or after (asLast = TRUE) the ordered ones |
CleanCols
: A function to remove all columns that have ONLY NA values
CleanRows
: A function to remove na rows in specified columes
ddup
: A function to remove duplicates across all columns (default),
or a given set of columns
Booleanize
: A function that turns a data.table into all logical values based on finding the value arg
in all or selected columns
RoundCols
: A convienience wrapper for round
that applies to all or a subset of cols
p_setcolorder
: A convienience wrapper for data.table::setcolorder
that makes it easy
set the order of a subset of columns
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.