strsplit_that_works: strsplit_that_works

Description Usage Arguments Details Examples

View source: R/strsplit_that_works.R

Description

We got tired of having to work with splitting strings in weird ways.

Usage

1
strsplit_that_works(cell, entity_requested, split = "_")

Arguments

cell

the string you want to split

entity_requested

a number representing the

split

split used in strsplit Default: '_'

Details

Returns only the part of a string as designated by entity_requested

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
try <- ("1_2_3_4")
strsplit_that_works(try, 1, split = "_")

library(tidyverse)
tidyr::table3 %>%
  mutate(map_chr(rate, first_part = strsplit_that_works, 1, split = "/"))

## End(Not run)

eringrand/RUncommon documentation built on Sept. 22, 2020, 10:49 p.m.