kaitlyngaynor / gorongosa-shiny

Code for Gorongosa Camera Trap Shiny App
https://kaitlyngaynor.shinyapps.io/gorongosa-shiny/
Apache License 2.0
2 stars 0 forks source link

Combination figures not working #5

Closed kaitlyngaynor closed 4 years ago

kaitlyngaynor commented 4 years ago

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.

kaitlyngaynor commented 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....