Closed kaitlyngaynor closed 4 years ago
I did some troubleshooting (printed the different reactive objects as tables) and realized that the problem happened between subsetting the dataframe by date/species and the calculation of RAI. I looked back into the RAI function and realized that there was still a portion that added a column for each species if absent. I modified the RAI function, and also greatly stripped it down because there wasn't a need to tidy up by species before calculation. See archived versions for the RAI calculations for all species at once, should I need it for anything.
This did create some other problems, though....
https://github.com/kaitlyngaynor/gorongosa-camera-traps/blob/72db372b59fafe00c06a925851f05458cc409c7e/shiny-rai/server.R#L196-L204
Got figures working in non-reactive space but there is an issue with subsetting the reactive data frames and calculating with RAI functions. To troubleshoot.