slice_col: Slice a dataframe column by a separator

slice_colR Documentation

Slice a dataframe column by a separator

Description

this function used to slice a column with a separator

Usage

slice_col(
  data,
  split.col,
  sep = ",",
  type = NULL,
  mode = NULL,
  fill = NA,
  drop = FALSE,
  nearcol = TRUE,
  addcol = F,
  fixed = TRUE,
  sort.col = F,
  decreasing = NULL
)

Arguments

data

specify a dataframe object

split.col

specify the column to be be sliced in quotation marks ""

sep

specify a separator to slice the column text with (",",";","-",..)

type

TRUE/FALSE whether to print the unique column names or not

mode

binary/value whether to return values or transform it into 1.

fill

specify a value to fill the results NA with

drop

whether to drop the column specified or not

nearcol

whether to put splitted col near the original col

addcol

whether to paste column name on splitted columns

fixed

allowing for regular expression

sort.col

whether to sort the the resulting sliced columns or not

decreasing

if sorted, whether to be in descending or ascending

Author(s)

Ibrahim H. Elkhidir


IbrahimHE/wrangler documentation built on March 27, 2022, 4:23 p.m.