Dear list,
I have a vector:
my.vector <- c("A", "B", "C", "D", "E", "F", "G")
and two other:
vec1 <- c("p", "q", "r", "s", "t")
vec2 <- c("x", "y", "z")
I want to substitute elements "b" and "e" in my.vector with vectors vec1 and
vec2 respectively so that the result becomes the vector:
c("A", "p", "q", "r" , "s" , "t", "C" , "D", "x", "y", "z", "F", "G")
The ordering of the elements is important.
Knut Hansen
______________________________________________
[email protected] mailing list -- To UNSUBSCRIBE and more, see
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.