ENMeval
ENMeval copied to clipboard
vignette: avoid removing all occs if no NAs
If the user runs the original code on occurrence data with no NAs in the climatic variables (i.e. with zero occs.na), occs[-occs.na, ] returns and empty dataframe, because occs[-0, ] is the same as occs[0, ]. Adding this if() statement will avoid that, making the vignette code more reproducible for any dataset.