How can I get a substring based on the index into the string?

strM <- c("abcde", "cdefg")
ind <- c(1,3,5)

I want to use ind to index into the strings so the result is:

strMind <- c("ace", "ceg")

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to