View source: R/extractLast2numericParts.R
extractLast2numericParts | R Documentation |
extractLast2numericParts
extracts last 2 (integer) numeric parts between punctuations out of character vector 'x'.
Runs faster than gregexpr
.
Note: won't work correctly with decimals or exponential signs !! (such characters will be considered as punctuation, ie as separator)
extractLast2numericParts(x, silent = FALSE, callFrom = NULL)
x |
main character input |
silent |
(logical) suppres messages |
callFrom |
(character) allow easier tracking of message(s) produced |
(numeric) matrix with 2 columns (eg from initial concatenated coordinates)
gregexpr
from grep
extractLast2numericParts(c("M01.1-4","M001/2.5","M_0001_03-16","zyx","012","a1.b2.3-7,2"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.