Description Usage Arguments Author(s) Examples
View source: R/src_string2chr.R
Assuming coordinates such as chr:start-end, function splits at delimiters and produces data.frame output. Uses 'data.table::tstrsplit' internally.
1 2 3 4 5 6 7 | string2chr(
x,
pattern = ":|-",
chr.name = "chr",
start.name = "start",
end.name = "end"
)
|
x |
input string(s) |
pattern |
pattern to split string at. Can be regexed. |
chr.name |
name for chr |
start.name |
name for start |
end.name |
name for end |
Alexander Toenges
1 2 | strs <- c("chr1:1-10", "chr2:2-20")
string2chr(strs, ":|-")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.