separate_n: A wrapper version of tidyr::separate() that automatically...

Description Usage Arguments Examples

View source: R/separate_n.R

Description

A wrapper version of tidyr::separate() that automatically creates and names correct number of new variables

Usage

1
2
separate_n(data, x, sep, prefix = "new_var_", fill = "right",
  extra = "warn")

Arguments

data

is the data

x

is a variable being separated

sep

is the separator character

prefix

prefix used in names of variables created by separation

fill

default argument passed to tidyr::separate()

extra

default argument passed to tidyr::separate()

Examples

1
mtcars %>% rownames_to_column("model") %>% separate_n(x = model, sep = " ")

Kidapt/keda documentation built on Nov. 23, 2019, 3:35 a.m.