Hi all, I would like to combine elements of a vector: vec <- c("astring", "b", "cstring", "d", "e") > vec [1] "astring" "b" "cstring" "d" "e"
such that for every element that contains "string" at the end, it is combined with the next element, so that I get this: > res [1] "astringb" "cstringd" "e" Any help is much appreciated, still learning. Many thanks, Jill ________________________________________________ Jill Hollenbach, PhD, MPH Associate Staff Scientist Center for Genetics Children's Hospital Oakland Research Institute jhollenb...@chori.org skype: jillah11 [[alternative HTML version deleted]] ______________________________________________ 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.