Closed dansmi-hub closed 1 year ago
Hi @dansmi-hub,
ah, good point. So the summary creates SP_name*Env_name combinations separated by a whitespace. And the whitespace is then used in the plot function to separate those two again, so either we use another character (e.g. ":"), or we store the names separately in the summary object, which is probably the more elegant option.
We would appreciate a pull request :). At the moment I don't have much time, but I guess in 1-2 months it will be time for a new CRAN version, because some bugs/improvements have accumulated.
Method plot.sjSDM will fail if you pass a model with species names that contain white space (Genus; Species). This is obviously very common and the error message is unintuitive.
Error in dimnames(x) <- dn : length of 'dimnames' [2] not equal to array extent Warning message: In par(oldpar) : calling par(new=TRUE) with no plot
Problem comes from
plotsjSDMcoef
line 11. Easy fix for this without rewriting the plotting function is specifying the need for no white space in species for the plot function error, or removing trailing white space in the object before attempting to plot.Something akin to janitor::make_clean_names() but in base R. I'm happy to look into this when I have more time.