I'm using Wallace to work on ENM with a summer intern. We found an error when Wallace tries to "
addLegend" to
Proccess Occs and
Partition Occs outputs:
In "Proccess Occs" when I click "Spatial Thin" it calculates, but does not display the results, Wallace crashes with a gray screen and I get this error in the console:
Warning: Error in addLegend: unused arguments (colors = c("red", "blue"), title = "Occ Records", labels = c("retained", "removed"), opacity = 1)
In "Partition Occs" when I select any option and then click "Partition" it calculates but does not display the results, Wallace crashes with a gray screen and I get a similar error in the console:
Warning: Error in addLegend: unused arguments (colors = newColors, title = "Partition Groups", labels = sort(unique(occsGrp)), opacity = 1)
As these are all proper arguments ts to "leaflet::addLegend" perhaps this function is not receiving the map data from which to operate? Looking over the GitHub code for
poccs_thinOccs.R &
part_spat.R doesn't reveal anything obvious.
I was able to replicate this behavior with our custom GBIF dataset as well as generic data loaded from GBIF (1000 observations from Larus occidentalis) and got the exact same errors.
Do you have any suggestions for how to fix this error in the "addLegend" portion of the Shiny app?
For relevant session information see below.
Thanks for making such a great app!
All the best,
Durrell
> sessionInfo()
R version 4.2.0 (2022-04-22)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Monterey 12.4
Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods
[7] base
other attached packages:
[1] glue_1.6.2 fields_14.0 viridis_0.6.2
[4] viridisLite_0.4.0 spam_2.9-0 wallace_1.9.3-6
[7] leaflet_2.1.1 shiny_1.7.2 raster_3.5-21
[10] sp_1.5-0