bstr_replace.Rd
Replace matched patterns in bstr sequences by replacements
bstr_replace(bstrobj, pattern, replacement, case_sensitive = FALSE)
bstrobj | bstr class object or character vector |
---|---|
pattern | Pattern to look for. |
replacement | A character vector of replacements or a function. |
case_sensitive | sensitive to case in pattern (default:FALSE) |
bstr_replace("AtGcTaat", "at", "cc")#> class: bstr,character #> number of sequences: 1 #> [1] no name 1 : ccGcTacc 8#> class: bstr,character #> number of sequences: 2 #> [1] no name 1 : ccGcTacc 8 #> [2] <NA> : xxGcTaxx 8#> class: bstr,character #> number of sequences: 2 #> [1] no name 1 : ccGcTacc 8 #> [2] <NA> : AtxxTaat 8#> class: bstr,character #> number of sequences: 2 #> [1] no name 1 : AtGcTacc 8 #> [2] <NA> : AtGcTaat 8#> class: bstr,character #> number of sequences: 1 #> [1] no name 1 : aTGcTaAT 8