ngrep( "abc", c("abc", "babcd", "abcdef", "apple"), value=TRUE )
if( re_exists(c("apple", "banana"), "^ap") ) print("yay!")
dat <- data.frame( x=letters, y=LETTERS )
rownames(dat) <- 1:26
## get all rows in dat with a 1, 2, 3 or 4 in the name
re_extract_rows( dat, "[1-4]" )
dat <- data.frame( x=letters, y=LETTERS )
rownames(dat) <- 1:26
## get all rows in dat with a 1, 2, 3 or 4 in the name
re_without_rows( dat, "[0-4]" )
Run the code above in your browser using DataLab