Top "Stringr" questions

The stringr package is a wrapper for the R stringi package that provides consistent function names and error handling for string manipulation.

Splitting a dataframe string column into multiple different columns

What I am trying to accomplish is splitting a column into multiple columns. I would prefer the first column to …

r split dataframe stringr
Extracting a string between other two strings in R

I am trying to find a simple way to extract an unknown substring (could be anything) that appear between two …

regex r stringr
regex multiple pattern with singular replacement

I am trying to replace both "st." and "ste." with "st". Seems like the following should work but it does …

regex r stringr
How to escape a backslash in R?

I'm working in R and having troubles escaping the backslash. I am using the library stringr. install.packages("stringr", repos=…

r backslash stringr
How to extract everything until first occurrence of pattern

I'm trying to use the stringr package in R to extract everything from a string up until the first occurrence …

r regex stringr
R: How to ignore case when using str_detect?

stringr package provides good string functions. To search for a string (ignoring case) one could use stringr::str_detect('TOYOTA …

r stringr
Detect multiple strings with dplyr and stringr

I'm trying to combine dplyr and stringr to detect multiple patterns in a dataframe. I want to use dplyr as …

r dplyr stringr
Remove all text between two brackets

Suppose I have some text like this, text<-c("[McCain]: We need tax policies that respect the wage earners …

regex r stringr
R regex gsub separate letters and numbers

I have a string that's mixed letters and numbers: "The sample is 22mg" I'd like to split strings where a …

regex r gsub stringr
str_replace (package stringr) cannot replace brackets in r?

I have a string, say fruit <- "()goodapple" I want to remove the brackets in the string. I decide …

r stringr