Dplyr for MNA (minimum number alive)


Thanks for the membership to the forum!

I'm starting to get a lot of capture-recapture data which I want to calculate MNA (minimum number alive) estimates on. ((MNA = actual number of individuals caught at time (t) + those present, not caught at time (t), but caught subsequently (Krebs, 1966))

But instead of doing this manually, I was hoping to find a package that would make this faster and reproducable, but no luck. Then I thought I could make some function for it using dplyr. Anyone done that before and can help get me started?


Bearing in mind that I know nothing about capture-recapture analysis other than what you've just described, a few packages that might be worth checking out…

Rcapture: Loglinear Models for Capture-Recapture in R https://www.jstatsoft.org/article/view/v019i05, https://CRAN.R-project.org/package=Rcapture](https://cran.r-project.org/package=Rcapture)

As far as calculating MNA, you could definitely write a function to do that, if it's as simple as you make it sound (i.e. you have the values you need). There's a thread on StackOverflow here that might help:

In the event that I was totally unhelpful (which is very possible, since I have no domain knowledge), I'd recommend checking out the rOpenSci community and discussion board:

rOpenSci is just great in general, but I'd also venture a guess that some folks over there might have a bit more expertise in the area (scientifically).


Thank you for your time mara,
The MRA, mark, Rmark etc would be to extensive for now (I will need to dive into that later), but for just abundance measures a MNA should be fine.

I knew about the stackoverflow-post, but the answer there didn't make much sense to me.

Thanks for the rOpenSci tip, I'll check it out and do some searching and browsing over there straight away :slight_smile:


Can you provide some sample data, structured like your real data? I’ve seen people record their capture-recapture data in a variety of ways (as you can see from that SO post)!

The calculation itself is pretty straightforward to implement, but the specific way to accomplish the calculation in code depends very much on the data structure you’re starting with.


Thanks for your reply!

I have more variables, but the ones that I would need here is only the individual animal's id and the trapping session (I have several dates for each session, but I will find a way to group these into sessions). Hope this makes sense? :slight_smile: And, thank you!

ID, date
individual_id1, june
individual_id2, june
individual_id2, june
individual_id3, june
individual_id1, july
individual_id1, september
individual_id3, september