I have a dataframe column which have pattern like
| NA
I want to replace this and text after this with blank space.
| NA | 0 | 4
So above string should be replaced by blank space. I used following code.
df$string <- gsub("| NA" , "",df$string)
But its nit workinh for the string after this pattern.