Repository navigation
wranglr 0.0.3
Breaking changes
-
create_sumry_tbl()now returnsQ25andQ75columns in place of the
IQRcolumn. The quartiles do not assume a symmetric distribution. To get
the old value, useQ75 - Q25. -
create_sumry_tbl()now returns the count of non-missing values inn,
and the count of all values in the newtotal_ncolumn.nandNAsnow
sum tototal_n. If you usednas the total count, usetotal_n. -
imputeNAs()is nowimpute_median(). Its behaviour does not change.
Replace all calls toimputeNAs()withimpute_median(). -
impute_predictors()is now defunct and gives an error when you call it,
it will be fully deprecated/removed in future versions.
New features
-
New
impute_missing()replacesNAvalues in a numeric vector with random
draws from a fitted distribution. It estimates the distribution parameters
with maximum likelihood.distrselects a Gaussian ("norm", the default),
Gamma ("gamma"), or Beta ("beta") distribution, andseedmakes the
draws reproducible.x <- rnorm(10, mean = 10, sd = 5) x[c(2, 7)] <- NA_real_ impute_missing(x) # Gaussian impute_missing(abs(x), "gamma") # Gamma
Minor improvements and fixes
-
create_sumry_tbl()now returnsQ25andQ75columns in place ofIQR,
and a newtotal_ncolumn.nnow counts only non-missing values. -
create_sumry_tbl()now keeps the class and level order of the first
grouping column if it is a factor. The "Total" row is the last level.
Other column types becomecharacter, so numeric grouping columns, such
ascylinmtcars, now work without conversion to a factor. -
create_sumry_tbl()now returnsNAfor all statistics (excepttotal_n,
NAs, andn) when all values ofvarare missing, instead of an error.