NEWS.md
distinct() now works on data frames with list columns (#773)pivot_wider(): Gains unused_fn argument (#698)case_when(): .default is used when calculating a common ptype (#751)pivot_wider(): Works correctly with dates (#759)case_match(): When comparing input vector to a length 1 literalverb.() functions are now deprecated (e.g. mutate.()). Users should now use the verb() versions of functions.nest(): Gains .by and .key argstidytable(): Auto-names unnamed inputsslice_*() family: by arg added to match dplyr semantics. .by can still be called by the user instead of by.dt(): Can use let() to add columns even on older versions of data.table
expand_grid(): Can use “unique” or “sorted” as column names (#718)slice_head()/_tail(): .by arg must be explicitly named when slicing by groupmutate(): When overwriting existing columns on data frames with a high number of columns (>1000)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 NAs 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 NAs (#541)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 inputsbind_cols.(): Correctly handles lists (#446)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.().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 framemutate.(): Can assign to the same column when .by = character(0) (#332)between() is now auto-translated to between.() when used inside tidytable functions%notin% now uses %chin% on character vectorsacross.(): Can pass extra arguments to a list of functions (#319)bind_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 argbind_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 argumentreplace_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.(): 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.()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 slicerename.(): Works when there are spaces in the column names (#109)summarize_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.tabletibble
glimpse() is now reexportedpillar in a later release once tibble::trunc_mat() & tibble::glimpse() are moved theretidytable now works with quosurestidyselect v0.1.1 compatibility: Updated functions to use where()
everything.() are now replaced by normal helpers like everything()
rename_across/_if/_at/_all have been superseded by rename_with.()
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 usedverb.()
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.tabletidytable 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