Top "Grepl" questions

grepl is an R function that searches for matches to argument pattern within each element of a character vector.

Remove entries from string vector containing specific characters in R

I've got two character vectors: x = {"a", "b", "c", "kt"} y = {"abs", "kot", "ccf", "okt", "kk", "y"} I need to …

r string character gsub grepl
Is it possible to use an AND operator in grepl()?

I want to search for anything that begins with 55 and anything that has the word Roof (case-sensitive, for those who …

r logic logical-operators grepl
How to check in every row in a column if it contains a substring

Let's say I have a column 'name' in the dataframe df: apple apple123 app be aple and, I want to …

r grepl
r check if string contains special characters

I am checking if a string contains any special characters. This is what I have, and its not working, if(…

r string grepl
R - gsub only digits

I would like to clean this vector and only retain the digits vec = c(" 4010 \"Filling in time budget diary\"", " 8888 \"Prob …

regex r gsub grepl
Extract URLs with regex into a new data frame column

I want to use a regex to extract all URLs from text in a dataframe, into a new column. I …

regex r grepl