psolymos / ResourceSelection

Resource Selection (Probability) Functions for Use-Availability Data in R
https://peter.solymos.org/ResourceSelection/
9 stars 4 forks source link

Check NAs when m is constant and throw meaningfull error message #15

Open psolymos opened 5 years ago

psolymos commented 5 years ago

Cases are dropped due to NAs will lead to mismatches in used/avail and ID vectors because objective function can't make a nice rectangular data of the available points.

Catch this case and throw a meaningful message (i.e. metching is OK before cases are dropped, but not after): "Mismatched IDs due to missingness: check NAs in data"