Dear R helpers!
I have a vector 'x1' and data.frame 'df1'. Do you have any suggestion how to
get vector x2, which will be a result of matching values from vector 'x1' and
values from 'df1'? Please, see the example:
x1 <- c(rep(1,3), rep(NA,2), rep(2,4))
df1 <- data.frame(c1 = c(1,2), c2 = c(5,6))
I would like to get vector x2:
> x2
[1] 5 5 5 NA NA 6 6 6 6
Thanks a lot, OV
[[alternative HTML version deleted]]
______________________________________________
[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.