separate_

0th

Percentile

Standard-evaluation version of separate.

This is a S3 generic.

Keywords
internal
Usage
separate_(data, col, into, sep = "[^[:alnum:]]+", remove = TRUE,
  convert = FALSE, extra = "warn", fill = "warn", ...)
Arguments
data
A data frame.
col
Name of column to split, as string.
into
Names of new variables to create as character vector.
sep
Separator between columns.

If character, is interpreted as a regular expression. The default value is a regular expression that matches any sequence of non-alphanumeric values.

If numeric, interpreted as positions to split at. Positive values st

remove
If TRUE, remove input column from output data frame.
convert
If TRUE, will run type.convert with as.is = TRUE on new columns. This is useful if the component columns are integer, numeric or logical.
extra
If sep is a character vector, this controls what happens when there are too many pieces. There are three valid options:

  • "warn" (the default): emit a warning and drop extra values.
  • "drop": drop any extra values without a w

fill
If sep is a character vector, this controls what happens when there are not enough pieces. There are three valid options:

  • "warn" (the default): emit a warning and fill from the right
  • "right": fill with missing values on t

...
Defunct, will be removed in the next version of the package.
Aliases
  • separate_
Documentation reproduced from package tidyr, version 0.4.1, License: MIT + file LICENSE

Community examples

Looks like there are no examples yet.