remove: Remove all matched patterns in bstr sequences

Description Usage Arguments Value Examples

Description

Remove all matched patterns in bstr sequences

Usage

1
2
3
4
5
6
7
bstr_remove(bstrobj, pattern, case_sensitive = FALSE)

bstr_remove_num(bstrobj)

bstr_remove_notalpha(bstrobj)

bstr_remove_gap(bstrobj, gap_chr = "-")

Arguments

bstrobj

bstr class object or character vector

pattern

regex pattern

case_sensitive

sensitive to case in pattern (default:FALSE)

gap_chr

a gap character

Value

A bstr object.

Examples

1
2
3
4
5
6
7
8
temp <- bstr(c("ATGCCCTAG", "aTGCcCtAg"))
c(temp, remove = bstr_remove(temp, "[aT]"))
c(temp, remove = bstr_remove(temp, "aT"))
c(temp, remove = bstr_remove(temp, "aT", TRUE))

bstr_remove_num(bstr("ac12 -xe gg. "))
bstr_remove_notalpha(bstr("ac12 -xe gg. "))
bstr_remove_gap(bstr("ac12 -xe gg. "))

t-arae/bstringr documentation built on March 18, 2021, 3:08 a.m.