Hi Jon, Sorry about the lack of information. I'll give the data from one of my traps: (nb. all of the data for each trap is referenced to the start day of the trap. ie ACAP1 started collecting at day 0 but parasitoid releases occurred 266, 259, 225 etc days before collecting took place)
Trap collection.days.2 release.days days.since.last.release ACAP1 0 -266 -12 # this tells me that at day 0 the last parasitoid release occurred 12 days beforehand, and so on... ACAP1 9 -259 -1 ACAP1 28 -225 -20 ACAP1 41 -216 -13 ACAP1 77 -28 -36 ACAP1 97 -12 -20 ACAP1 106 0 -1 ACAP1 125 8 -20 ACAP1 146 28 -21 ACAP1 168 41 -43 ACAP1 195 77 -70 ACAP1 217 97 -92 ACAP1 259 105 -134 ACAP1 288 125 -163 ACAP1 311 288 -23 ACAP1 337 311 -26 ACAP1 378 337 -41 ACAP1 400 378 -22 ACAP1 440 400 -26 ACAP1 464 414 -14 The output I want is days.since.last.release for all of the traps I have. Thanks so much, Ben -- View this message in context: http://r.789695.n4.nabble.com/Adapting-R-code-for-different-traps-tp3585215p3585823.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.