Learn R Programming

tidytable (version 0.5.6)

dt_arrange: Deprecated dt_verb() functions

Description

tidytable was originally built using dt_verb() syntax. These functions have since been deprecated.

Please use the verb.() versions in your code, as the dt_verb() functions will be removed by the end of 2020.

Usage

dt_arrange(.df, ...)

dt_bind_rows(..., .id = NULL)

dt_bind_cols(...)

dt_case(..., default = NA)

dt_count(.df, ...)

dt_distinct(.df, ..., .keep_all = FALSE)

dt_drop_na(.df, ...)

dt_fill(.df, ..., .direction = c("down", "up", "downup", "updown"), .by = NULL)

dt_filter(.df, ..., .by = NULL)

dt_get_dummies( .df, cols = c(where(is.character), where(is.factor)), prefix = TRUE, prefix_sep = "_", drop_first = FALSE, dummify_na = TRUE )

dt_group_split(.df, ..., .keep = TRUE)

dt_ifelse(conditions, true, false, na = NA)

dt_left_join(x, y, by = NULL)

dt_inner_join(x, y, by = NULL)

dt_right_join(x, y, by = NULL)

dt_full_join(x, y, by = NULL, suffix = c(".x", ".y"))

dt_anti_join(x, y, by = NULL)

dt_map(.x, .f, ...)

dt_map_lgl(.x, .f, ...)

dt_map_int(.x, .f, ...)

dt_map_dbl(.x, .f, ...)

dt_map_chr(.x, .f, ...)

dt_map_dfc(.x, .f, ...)

dt_map_dfr(.x, .f, ..., .id = NULL)

dt_map_df(.x, .f, ...)

dt_map2(.x, .y, .f, ...)

dt_map2_lgl(.x, .y, .f, ...)

dt_map2_int(.x, .y, .f, ...)

dt_map2_dbl(.x, .y, .f, ...)

dt_map2_chr(.x, .y, .f, ...)

dt_map2_dfc(.x, .y, .f, ...)

dt_map2_dfr(.x, .y, .f, ..., .id = NULL)

dt_map2_df(.x, .y, .f, ..., .id = NULL)

dt_mutate(.df, ..., .by = NULL)

dt_mutate_across(.df, .cols = everything(), .fns, ..., .by = NULL)

dt_n()

dt_group_nest(.df, ..., .key = "data", .keep = FALSE)

dt_pivot_longer( .df, cols = everything(), names_to = "name", values_to = "value", values_drop_na = FALSE, ... )

dt_pivot_wider( .df, names_from = name, values_from = value, id_cols = NULL, names_sep = "_", values_fn = NULL )

dt_pull(.df, var = -1)

dt_relocate(.df, ..., .before = NULL, .after = NULL)

dt_rename(.df, ...)

dt_rename_with(.df, .fn, .cols = everything(), ...)

dt_replace_na(.x, replace = NA)

dt_row_number()

dt_select(.df, ...)

dt_separate(.df, col, into, sep = "[^[:alnum:]]+", remove = TRUE, ...)

dt_slice(.df, ..., .by = NULL)

dt_slice_head(.df, n = 5, .by = NULL)

dt_slice_tail(.df, n = 5, .by = NULL)

dt_slice_min(.df, order_by, n = 1, .by = NULL)

dt_slice_max(.df, order_by, n = 1, .by = NULL)

dt_summarise(.df, ..., .by = NULL)

dt_summarize(.df, ..., .by = NULL)

dt_transmute(.df, ..., .by = NULL)

dt_unite(.df, col = "new_col", ..., sep = "_", remove = TRUE, na.rm = FALSE)

dt_unnest_legacy(.df, ..., .keep_all = FALSE)

Arguments

.df

A data.frame or data.table

...

Variables to arrange by

.id

If TRUE, an integer column is made as a group id

default

Default value. Set to NA by default.

.keep_all

Only relevant if columns are provided to ... arg. This keeps all columns, but only keeps the first row of each distinct values of columns provided to ... arg.

.direction

Direction in which to fill missing values. Currently "down" (the default), "up", "downup" (first down then up), or "updown" (first up and then down)

.by

Columns to group by when filling should be done by group

cols

A single column or a vector of unquoted columns to dummify. Defaults to all character & factor columns using c(where(is.character), where(is.factor)). tidyselect compatible.

prefix

TRUE/FALSE - If TRUE, a prefix will be added to new column names

prefix_sep

Separator for new column names

drop_first

TRUE/FALSE - If TRUE, the first dummy column will be dropped

dummify_na

TRUE/FALSE - If TRUE, NAs will also get dummy columns

.keep

Should the grouping columns be kept

conditions

Conditions to test on

true

Values to return if conditions evaluate to TRUE

false

Values to return if conditions evaluate to FALSE

na

Value to return if an element of test is NA.

x

A data.frame or data.table

y

A data.frame or data.table

by

Columns to group by when filling should be done by group

suffix

Append created for duplicated column names when using full_join.()

.x

A data.frame or data.table

.f

A function

.y

A data.frame or data.table

.cols

A single column or a vector of unquoted columns to dummify. Defaults to all character & factor columns using c(where(is.character), where(is.factor)). tidyselect compatible.

.fns

Functions to pass. Can pass a list of functions.

.key

Name of the new column created by nesting.

names_to

Name of the new "names" column. Must be a string.

values_to

Name of the new "values" column. Must be a string.

values_drop_na

If TRUE, rows will be dropped that contain NAs.

names_from

A pair of arguments describing which column (or columns) to get the name of the output column (name_from), and which column (or columns) to get the cell values from (values_from). tidyselect compatible.

values_from

A pair of arguments describing which column (or columns) to get the name of the output column (name_from), and which column (or columns) to get the cell values from (values_from). tidyselect compatible.

id_cols

A set of columns that uniquely identifies each observation. Defaults to all columns in the data table except for the columns specified in names_from and values_from. Typically used when you have additional variables that is directly related. tidyselect compatible.

names_sep

the separator between the names of the columns

values_fn

Should the data be aggregated before casting? If the formula doesn't identify a single observation for each cell, then aggregation defaults to length with a message.

var

The column to pull from the data.table as:

  • a variable name

  • a positive integer giving the column position

  • a negative integer giving the column position counting from the right

.before

Column to move selection before

.after

Column to move selection after

.fn

Function to transform the names with.

replace

If .x is a data frame, a list() of replacement values for specified columns. If .x is a vector, a single replacement value.

col

The column to split into multiple columns

into

New column names to split into. A character vector.

sep

Separator to split on. Can be specified or detected automatically

remove

If TRUE, remove the input column from the output data.table

n

Number of rows to grab

order_by

Variable to arrange by

na.rm

If TRUE, NA values will be not be part of the concatenation