datawizard 0.6.0
BREAKING CHANGES
-
The minimum needed R version has been bumped to
3.6. -
Following deprecated functions have been removed:
data_cut(),data_recode(),data_shift(),data_reverse(),data_rescale(),
data_to_factor(),data_to_numeric() -
New
text_format()alias is introduced forformat_text(), latter of which
will be removed in the next release. -
New
recode_values()alias is introduced forchange_code(), latter of which
will be removed in the next release. -
data_merge()now errors if columns specified inbyare not in both datasets. -
Using negative values in arguments
selectandexcludenow removes the columns
from the selection/exclusion. The previous behavior was to start the
selection/exclusion from the end of the dataset, which was inconsistent with
the use of "-" with other selecting possibilities.
NEW FUNCTIONS
-
data_peek(): to peek at values and type of variables in a data frame. -
coef_var(): to compute the coefficient of variation.
CHANGES
-
data_filter()will give more informative messages on malformed syntax of
thefilterargument. -
It is now possible to use curly brackets to pass variable names to
data_filter(),
like the following example. See examples section in the documentation of
data_filter(). -
The
regexargument was added to functions that use select-helpers and did
not already have this argument. -
Select helpers
starts_with(),ends_with(), andcontains()now accept
several patterns, e.gstarts_with("Sep", "Petal"). -
Arguments
selectandexcludethat are present in most functions have been
improved to work in loops and in custom functions. For example, the following
code now works:
foo <- function(data) {
i <- "Sep"
find_columns(data, select = starts_with(i))
}
foo(iris)
for (i in c("Sepal", "Sp")) {
head(iris) |>
find_columns(select = starts_with(i)) |>
print()
}- There is now a vignette summarizing the various ways to select or exclude
variables in most{datawizard}functions.