Thanks Jorge, for your reply. In the end I changed my approach and used a
sub() strategy I found on this forum to recover the prefixes as below.
IDs.prefix <- sub("([^*])(_.*)", "\\1" , sampleIDs )
IDs.split <- cbind(sampleIDs , IDs.prefix)
Regards
M
--
View this message in context:
http://r.789695.n4.nabble.com/vectorised-recovery-of-strsplit-value-tp3161254p3161806.html
Sent from the R help mailing list archive at Nabble.com.
______________________________________________
[email protected] 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.