NEWS.md
separate()
: Can now handle when too many or too few new names are specified in into
arg (#666)unnest_longer()
: Gains keep_empty
argseparate()
: Can overwrite separated column without removal (#680)na_if()
: Properly replaces NA
s when y
is a vector (#689)across()
: Anonymous functions are properly translated (#699)pivot_wider()
: names_sort = FALSE
works (#705)by = character()
in joins is now deprecated. Users should instead use cross_join()
.nest_join()
%in%
falls back to base::'%in%'
when input types aren’t compatible with vec_in()
(@krterberg, #632)relocate()
: Can rename columns that are movedby = character()
group_by()
: Gains .add
argumentungroup()
: Gains ...
argumentsrow_number()
: Works correctly on 0-row data frame when overwriting existing column (#639)slice_head()
/slice_tail()
: Properly slice on 0-row data frame (#642)dplyr
-style interface to grouping
add_tally()
/tally()
case_match()
summarize()
: Gains .unpack
argumentpivot_longer()
: Can pass a single ptype or function to values_ptypes
/values_transform
/names_ptypes
/names_transform
args.unnest_longer()
/unnest_wider()
: Can pass a single ptype or function to ptype
/transform
args.tidytable::'%in%'
dispatches to base::'%in%'
when comparing with a list (#563)pivot_wider()
: Works with column names with spaces (#569)pivot_wider()
: names_glue="{.value}_{somecolumn}"
assigns column names in correct order (@Darxor, #579)left_join()
: Works when y matching columns in by
is a non matching column of x (#625)consecutive_id.()
if_else.()
ifelse.()
(introduced in v0.4.0) will remain in the package%in%
arrange.()
: Can use .env
inside arrange expressionscase_when.()
: Gains .default
/.ptype
/.size
argscoalesce.()
: Gains .ptype
/.size
argsrelocate.()
: Now properly handles multiple columns selected in .before
or .after
slice_min.()
/slice_max.()
: Gain with_ties
argumentacross.()
are handled properly (#505)across.()
: Can namespace functions in .fns
arg (#511)as_tidytable()
: Can keep row names when converting a matrix (#527)unnest.()
: Handles empty data frames (@roboton, #530)nth.()
: Extracts list elements (#534)arrange.()
: Properly sorts NA
s (#541)arrange_across.
/mutate_across.
/summarize_across.
are now defunct. They have been deprecated with warnings since v0.6.4 (Jul 2021). Users must now use across.()
inside arrange.()
/mutate.()
/summarize.()
.expand_grid.()
: Works with data frame inputsfirst.()
/last.()
/nth.()
: Gain na_rm
argmutate_rowwise.()
: Gains .keep
, .before
, and .after
argstidytable()
: Auto-unpacks unnamed data frame inputscount.()
: Default name is now n
instead of N
to match dplyr semanticsbind_cols.()
: Correctly handles lists (#446)arrange.()
case_when.()
: Faster when conditions evaluate to NA
group_split.()
left_join.()
: Faster when keep = FALSE
(the default)select.()
uncount.()
summarize.()
: Now sorts by the grouping variables when .by
is used.dt()
: Experimental support for tidy evaluationas_tidytable()
: Now defaults to .name_repair = "unique"
to relax restrictions on creating new tidytablesdt()
: Faster when adding new columns or updating existing columnsas_tidytable()
: Faster when converting data.frame
or list
objects to a tidytableget_dummies.()
unite.()
: New column is always placed before the first united column in the data frame, regardless of order provided..data
pronoun inside desc()
in arrange.()
(#371).data
and .env
pronouns now work in tidytable
functionsacross.()
: Works inside of a named mutate.()
. Useful with rowSums
/rowMeans
(#346)first.()
/last.()
: Gain a default
argmutate.()
: Can use stringr::str_glue()
without specifying .envir
replace_na.()
: Checks that replace
arg only uses columns that exist in the data framebetween()
is now auto-translated to between.()
when used inside tidytable
functions%notin%
now uses %chin%
on character vectorsbind_rows.()
/bind_cols.()
!!!
mutate.()
: Can use glue::glue()
without specifying .envir
pull.()
: Added a name
argumentseparate.()
: Can omit output columns by using NA
in into
tidytable()
: Can splice quosuresunnest.()
: Added keep_empty
argacross.()
in v0.6.1
bind_cols
, bind_rows
, group_split
, or joins.complete.()
: Added a .by
argumentexpand.()
: Added a .by
argumentmutate.()
: Auto-names unnamed inputstransmute.()
: Auto-names unnamed inputsexpand.()
with nesting.()
mutate.()
:
.keep
argument.before
/.after
argumentstidytable()
: Added .name_repair
argumentfilter.()
when .by
is usedgroup_split.()
: Added a .named
argument. If .named = TRUE
, the resulting list will have names that indicate the group they are a part of.pivot_longer.()
: Can now use names_to = c(".value", NA)
to drop the id column.replace_na.()
: Can now replace NULL
values in list-columns!!!
now works in crossing.()
and expand_grid.()
verb.()
equivalents when used inside of tidytable’s mutate/arrange/filter/summarize/slice.
pivot_longer.()
: Correctly pivots unbalanced datasets when ".value"
is used in names_to
(@moutikabdessabour, #212)as_tidytable()
: Gains .name_repair
and .keep_rownames
argscount.()
: Added wt
, sort
and name
args. (@moutikabdessabour, #196)mutate.()
: Variables are now updated in order when using “.by” (#166)pivot_longer.()
names_prefix
arg".value"
in names_to
pivot_wider.()
: Can now use ".value"
in names_glue
separate.()
: Added convert
argsummarize.()
: Variables are now created in order (#188)pivot_longer.()
: values_drop_na
is no longer the 5th argument in the functionpivot_wider.()
: values_fn
& values_fill
args are no longer the 6th & 7th argspivot_longer.()
names_sep
, names_pattern
, names_ptypes
, names_transform
, names_repair
, values_ptypes
, values_transform
, fast_pivot
fast_pivot
arg: Faster pivoting. The “names” column will be a factor instead of character. Default is set to FALSE
to match tidyverse semantics. Note: This option sets variable.factor = TRUE
in data.table::melt()
, which is what leads to it being faster.pivot_wider.()
names_prefix
, names_glue
, names_sort
, names_repair
dt_verb()
versions of functions have been removed from the package. They have been deprecated with warnings since v0.5.2crossing.()
: Now works with data frame inputs (@moutikabdessabour, #143)distinct.()
: Can rename columns (#153)get_dummies.()
: Dummy columns are now sorted in alphabetical orderpivot_wider.()
: Added values_fill
argumentbind_cols.()
: Name repair uses vec_as_names()
instead of vec_as_names_legacy()
bind_cols.()
: Added .name_repair
argunnest.()
: Added names_sep
and names_repair
argsprint()
n
, width
, and n_extra
argsslice.()
: Can now drop specified rows with negative numbersarrange_across.()
case_when.()
case.()
will remain in the package, as it is called like data.table::fcase()
but allows for the default
to be a vector.desc.()
unnest.()
: .keep_all
arg changed to .drop
bind_rows.()
: Removed .use_names
and .fill
args
TRUE
, which matches dplyr
semantics.complete.()
: .fill
arg renamed to fill
pull.()
: defaults to var = -1
instead of var = NULL
var = NULL
was explicitly called.slice.()
: .by
must be named when slicing by grouptidytable
now integrates better with tidyverse functions through vctrs
. This means code such as vec_cbind(tibble::tibble(x = 1:3), tidytable(y = "foo"))
will bind the results into a tidytable.complete.()
: Can now append extra valuespull.()
: Numerical selection now worksslice.()
: Now uses ...
to select which rows to slicesummarize_across.()
now use a suffix instead of a prefixmutate_across.()
: Added .names
arg to help with naming newly created columnssummarize_across.()
: Added .names
arg to help with naming newly created columnssummarize.()
: Added .sort
arg to optionally sort the resulting data.tabletransmute.()
: Doesn’t drop “by” columns (#98)slice.()
full_join.()
: No longer returns a keyed data.table (#102)tibble
glimpse()
is now reexportedpillar
in a later release once tibble::trunc_mat()
& tibble::glimpse()
are moved therebind_rows.()
use.names
arg renamed to .use_names
fill
arg renamed to .fill
replace_na.()
: Now works on data.frame
/data.table
inputs as well as vectorsdesc.()
has been deprecated due to incompatibility with character columnsby
has been deprecated for .by
. This will allow “by” to be used as a column name in mutate.()
& summarize.()
in future releases.dt_verb()
functions are soft deprecatedunnest.()
: Added .keep_all
arg to keep all list columns that were not unnesteddistinct.()
bug where it wasn’t returning unique rowstidytable
now works with quosurestidyselect v0.1.1
compatibility: Updated functions to use where()
nest_by.()
: Added .keep
argeverything.()
are now replaced by normal helpers like everything()
rename_across/_if/_at/_all
have been superseded by rename_with.()
group_split.()
: keep
arg renamed to .keep
tidytable
now utilizes tidyselect
& vctrs
get_dummies.()
: cols
arg defaults to c(is.character, is.factor)
. The result is the same, but is more consistent with other enhanced selection functionsmutate_across.()
: .funs
argument renamed to .fns
to match dplyr 1.0bind_rows.()
: Does name checking and fills missingdistinct.()
: Added .keep_all
argumentfill.()
: Preserves column order when using “by”group_split.()
: Added keep
argnest_by.()
select.()
: Now allows column renamingtransmute.()
: Summary functions (mean
/max
/etc.) can now be usedgroup_split.()
: Now returns a list of tidytables instead of data.tablesleft_join.()
: Now works with “by” columns of different namesverb.()
dt_verb()
functions still work, but may be slowly deprecated in future releasesfilter.()
now works with “by”pivot_wider.()
can now be used with an aggregation functionpull.()
defaults to last column in a data.tableifelse.()
n.()
nest_by.()
replaces dt_group_nest()
row_number.()
transmute.()
unnest.()
replaces dt_unnest_legacy()
any_of.()
tidytable
class is a data.table subclass with cleaner printing.tidytable
class in the background.tidytable()
: Create a data.table/tidytableas_tidytable()
: Convert to data.table/tidytableis_tidytable()
: Test if an object is a data.table/tidytabledt_get_dummies()
: Get dummy variablesdt_separate()
dt_pivot_longer()
“cols” arg now defaults to dt_everything()
instead of NULL
. The result is the same, but is more consistent with other enhanced selection functions.N
now works when using dt_slice()
& variants~
in dt_map()
dt()
docs per CRAN instructionsdt_mutate()
& dt_rename()
no longer modify-by-referencedt_unnest_legacy()
drops “keep” argument, but automatically keeps all non-nested columns.
dt()
now automatically converts data.frame input to a data.tabledt_mutate_across()
: Added “by” arg