Forked from anonymous/gist:de96063783c7e2be395462b447c3982e
Last active
October 31, 2017 13:11
-
-
Save Betawolf/6bad72fb30ad3da70e9320cfac33ffe1 to your computer and use it in GitHub Desktop.
Updated helper function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# original vector | |
vctseq <- c('1:4', '1:6', '1,5', '1,3,5', '2, 4:8, 10') | |
# helper function to parse text | |
# can be done within lapply, as well | |
fctParse <- function(x){eval(parse(text = paste0('c(',x,')')))} | |
# create list of number strings | |
lstseq <- lapply(vctseq, fctParse) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment