deprecated-se | R Documentation |
tidyr used to offer twin versions of each verb suffixed with an underscore. These versions had standard evaluation (SE) semantics: rather than taking arguments by code, like NSE verbs, they took arguments by value. Their purpose was to make it possible to program with tidyr. However, tidyr now uses tidy evaluation semantics. NSE verbs still capture their arguments, but you can now unquote parts of these arguments. This offers full programmability with NSE verbs. Thus, the underscored versions are now superfluous.
Unquoting triggers immediate evaluation of its operand and inlines
the result within the captured expression. This result can be a
value or an expression to be evaluated later with the rest of the
argument. See vignette("programming", "dplyr")
for more information.
complete_(data, cols, fill = list(), ...)
drop_na_(data, vars)
expand_(data, dots, ...)
crossing_(x)
nesting_(x)
extract_(
data,
col,
into,
regex = "([[:alnum:]]+)",
remove = TRUE,
convert = FALSE,
...
)
fill_(data, fill_cols, .direction = c("down", "up"))
gather_(
data,
key_col,
value_col,
gather_cols,
na.rm = FALSE,
convert = FALSE,
factor_key = FALSE
)
nest_(...)
separate_rows_(data, cols, sep = "[^[:alnum:].]+", convert = FALSE)
separate_(
data,
col,
into,
sep = "[^[:alnum:]]+",
remove = TRUE,
convert = FALSE,
extra = "warn",
fill = "warn",
...
)
spread_(
data,
key_col,
value_col,
fill = NA,
convert = FALSE,
drop = TRUE,
sep = NULL
)
unite_(data, col, from, sep = "_", remove = TRUE)
unnest_(...)
data |
A data frame |
fill |
A named list that for each variable supplies a single value to
use instead of |
... |
<
When used with factors, When used with continuous variables, you may need to fill in values
that do not appear in the data: to do so use expressions like
|
vars , cols , col |
Name of columns. |
x |
For |
into |
Names of new variables to create as character vector.
Use |
regex |
A string representing a regular expression used to extract the
desired values. There should be one group (defined by |
remove |
If |
convert |
If NB: this will cause string |
fill_cols |
Character vector of column names. |
.direction |
Direction in which to fill missing values. Currently either "down" (the default), "up", "downup" (i.e. first down and then up) or "updown" (first up and then down). |
key_col , value_col |
Strings giving names of key and value cols. |
gather_cols |
Character vector giving column names to be gathered into pair of key-value columns. |
na.rm |
If |
factor_key |
If |
sep |
Separator delimiting collapsed values. |
extra |
If
|
drop |
If |
from |
Names of existing columns as character vector |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.