Changelog
Source:NEWS.md
zmisc 0.3.0
New features
Adds argument check functions,
chk_*(). The family covers the atomic types in both scalar and vector form (chk_string(),chk_character(),chk_number(), and so on), lists and composite objects (chk_list(),chk_data_frame(),chk_tibble(), …), classes and arbitrary conditions (chk_class(),chk_true(),chk_that()), andchk_any()for a requirement that any one of several checks may satisfy. Seevignette("chk"), and?chk_atomic,?chk_compositeand?chk_other.Adds
glue_vector(), which applies agluetemplate element-wise to a vector.glue()andglue_data()are re-exported alongside it.Adds
asciify(), which transliterates accented characters to ASCII.Adds
yencode()andydecode(), which encode strings into a restricted character set and back.Fixes NOTE regarding pipes and dependency on R 4.1.
Breaking changes
In
lookup()andlookuper(), thedefaultargument is renamed to.defaultand follows..., so it must be named. Calls that passdefaultby name or by position now raise an error.lookup()no longer accepts factors, either asxor as columns of the lookup table. Previously, a factorxhad its levels looked up. Uselevels(x) <- lookup(levels(x), lookup_table)for that behavior.zingle()no longer has anna.rmargument. Missing values are handled byna.ok.partial,na.ok.allandempty.okinstead. The closest equivalent ofna.rm = TRUEisna.ok.partial = TRUE, na.ok.all = TRUE, empty.ok = TRUE, except thatNaNnow counts as a value rather than as missing. An empty vector is now an error unlessempty.ok = TRUE; previously it returnedNA.ll_assert_labelled()is renamed toll_chk_labelled(), following thechk_naming used for the new check functions. The old name is removed.
Bug fixes and behavior changes
Various fixes and improvements to zeq(), zample() and zingle().
wrap_error()now honors itswrapargument correctly.
zmisc 0.2.3
CRAN release: 2023-08-22
Adds the notate() function.
Adds a default parameter to the lookup() and lookuper() functions.
zmisc 0.2.1
CRAN release: 2022-02-02
- This version includes documentation improvements as well as a few other fixes.
zmisc 0.2.0
- This version adds two functions,
lookup()andlookuper(), designed to look up values from a lookup table in a way that works smoothly in an R workflow, in particular within pipes.