Answers for "remove rows from dataframe when match any string in vector r"

R
3

r remove row dataframe

myData[-c(2, 4, 6), ]   # remove rows 2, 4, 6
Posted by: Guest on July-08-2020
0

r remove all string before : in r data frame

> x <- 'aabb.ccdd'
> sub('.*', '', x)
[1] ""
> sub('bb.*', '', x)
[1] "aa"
> sub('.*bb', '', x)
[1] ".ccdd"
> sub('\..*', '', x)
[1] "aabb"
> sub('.*\.', '', x)
[1] "ccdd"
Posted by: Guest on May-30-2020

Code answers related to "remove rows from dataframe when match any string in vector r"

Browse Popular Code Answers by Language