deduped() and with_deduped() gain a new
verbose argument which adds informative deduplication
messaging if TRUE, either by passing the argument or setting the new
global options(deduped.verbose = TRUE).deduped() now has early exits for inputs of length
<= 1 or when no duplication is found.deduped() now drops names if f() drops
names, but keeps input names otherwise. Previously it always kept input
names (#5).deduped_map() has now been completely deleted and the
“Suggests” dependence on purr has been removed. The function was
deprecated with a warning in 0.2.0 and has no documented usage on github
or cran.with_deduped() for malformed inputs
(e.g. not a call tree, or a call with no first argument to
deduplicate.)deduped(f)(x) (and with_deduped) check
that the function maintains length and error if not.
deduped(f)(x) (and with_deduped) now
maintain names and attributes (since we check that length is preserved).
This includes functions that add attributes like fs::path()
where previously this dropped those. Added fs::path_rel
example to README.
Changed to using collapse::fmatch and
base::match in place of fastmatch::fmatch
which as a side effect adds a hash attribute. Removed dependency on
fastmatch.
New with_deduped() acts on an existing expression:
this means you can attach deduplication to an existing call, without
having to break it up. For example,
f(x) |> with_deduped() instead of
deduped(f)(x).
deduped(f)(x) now warns rather than errors on
anything other than an atomic vector or list and simply acts without
deduplication.
deduped() now works correctly on list inputs.deduped_map() was deprecated since it was found to be
slower and more complex in most cases compared to
deduped(lapply)() or deduped(purrr::map)(),
once the list-input issue (above) was fixed.