search for: vectorized_substr

Displaying 1 result from an estimated 1 matches for "vectorized_substr".

2011 Apr 11
1
Getting many substrings but only loading the original string one time.
...start and stop would be vector instead of single integers. Example (I'm reducing the size of the string for the example) of how this might work: > longerString <- 'HelloThisIsMyLongerString" > startVector <- c(2,6,4) > stopVector <- c(4,10,5) > substrings <- vectorized_substr(longerString, startVector, stop Vector) > longerString [1] "ell" "ThisI" "lo" Then I'd like to concatenate them (there will be many of them) > result <- paste(longerString,collapse='') > result [1] "ellThisIlo" (perhaps the paste co...