Skip to content

vignette: avoid removing all occs if no NAs#170

Open
AMBarbosa wants to merge 1 commit intojamiemkass:masterfrom
AMBarbosa:patch-1
Open

vignette: avoid removing all occs if no NAs#170
AMBarbosa wants to merge 1 commit intojamiemkass:masterfrom
AMBarbosa:patch-1

Conversation

@AMBarbosa
Copy link

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.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant