[R] Deleting observations from baseline that don't appear in follow up

2012-04-27 Thread justin jarvis
Hello all, I'm almost embarrassed to post this , it seems so easy. Suppose I have a baseline and follow up survey but some people are missing in the follow up: baseline-data.frame(id=c(3,5,7,9,12), data= runif(5)) follow.up-data.frame(id=c(3,7,9,12), data= runif(4)) baseline id data 1

Re: [R] Deleting observations from baseline that don't appear in follow up

2012-04-27 Thread Sarah Goslee
What about baseline[baseline$id %in% follow.up$id, ] or the same thing but using subset(). Sarah On Fri, Apr 27, 2012 at 4:36 PM, justin jarvis littledude.jar...@gmail.com wrote: Hello all, I'm almost embarrassed to post this , it seems so easy.  Suppose I have a baseline and follow up

Re: [R] Deleting observations from baseline that don't appear in follow up

2012-04-27 Thread Jeff Newmiller
Read ?merge --- Jeff NewmillerThe . . Go Live... DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go... Live: OO#.. Dead: