Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201839

How to use two conditions on string search using gsub in R?

$
0
0

I have a vector of characters and I want to search for everytime "RR" appears, and replace by "" empty space. But I can´t miss the "ANRR". I was wondering something like:

gsub("RR|!ANRR", "",charvector$vector)

But it doesn´t work. I was wondering how to include "OR" and "NOT" in the same expression?


Viewing all articles
Browse latest Browse all 201839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>