rbchan / unmarked

R package for hierarchical models in ecological research
https://rbchan.github.io/unmarked/
37 stars 25 forks source link

Remove reshape2 dependency #161

Closed kenkellner closed 4 years ago

kenkellner commented 4 years ago

reshape2 doesn't seem to be actively developed anymore, being superseded by tidyr. It isn't used much in unmarked and where it is used it can be replaced by stats::reshape, thus, this PR.

Based on the relevant tests, this change does not reintroduce the issues with factors and formatLong fixed in 79870d02. The covariate data frame is re-arranged via indexing rather than melting/casting so there aren't any changes in column classes.

This PR doesn't fix a specific bug and isn't strictly necessary at the moment, but I was looking into #65 and ended up writing it. So feel free not to merge. Either way I think we can close #65.