About 2,760,000 results
Open links in new tab
  1. r - How to ignore case when using str_detect? - Stack Overflow

    61 stringr package provides good string functions. To search for a string (ignoring case) one could use stringr::str_detect('TOYOTA subaru',ignore.case('toyota')) This works but gives warning …

  2. How to extract everything after a specific string? - Stack Overflow

    Jul 25, 2019 · 0 For some reason the responses here didn't work for my particular string. I found this response more helpful (i.e., using Stringr's lookbehind function): stringr str_extract capture …

  3. stringr, str_extract: how to do positive lookbehind?

    stringr, str_extract: how to do positive lookbehind? Asked 9 years, 7 months ago Modified 3 years, 11 months ago Viewed 8k times

  4. How to remove all whitespace from a string? - Stack Overflow

    May 13, 2011 · The stringr approach: str_replace_all and str_trim stringr provides more human-readable wrappers around the base R functions (though as of Dec 2014, the development …

  5. stringr str_replace on multiple patterns and replacements?

    Feb 8, 2020 · stringr str_replace on multiple patterns and replacements? Asked 5 years, 8 months ago Modified 1 year, 6 months ago Viewed 23k times

  6. stringr: Removing Parentheses and Brackets from string

    Sep 19, 2018 · If we want to do the extract instead of removing use either gregexpr/regmatches from base R or str_extract from stringr to check for patterns where a number could start with - …

  7. Remove all special characters from a string in R? - Stack Overflow

    For the most easily readable code, you want the str_replace_all from the stringr package, though gsub from base R works just as well. The exact regular expression depends upon what you …

  8. Extract all text after last occurrence of a special character

    Dec 16, 2020 · I have the string in R BLCU142-09|Apodemia_mejicanus and I would like to get the result Apodemia_mejicanus Using the stringr R package, I have tried …

  9. Extract the first (or last) n characters of a string

    Apr 9, 2013 · The stringr package provides the str_sub function, which is a bit easier to use than substr, especially if you want to extract right portions of your string : R> str_sub("leftright",1,4) …

  10. Extracting the last n characters from a string in R

    How can I get the last n characters from a string in R? Is there a function like SQL's RIGHT?