ENMeval icon indicating copy to clipboard operation
ENMeval copied to clipboard

vignette: avoid removing all occs if no NAs

Open AMBarbosa opened this issue 6 months ago • 0 comments

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.

AMBarbosa avatar Jul 15 '25 13:07 AMBarbosa