Skip to content

Error in if (prop == 0) { : missing value where TRUE/FALSE needed if NAs not removed #8

Description

@TheTams

I have created an object 'Rob_extr' using the extraction function.
It has columns of ind_id, tax (genera), sub (genus-species), lat, lan, cells, the 19 bioclim colnames.
As generated, it runs as below:

Rob_mcr <- MCR(Rob_extr, method = 'unweight', plot = FALSE)
Error in if (prop == 0) { : missing value where TRUE/FALSE needed

If I run, the below, it appears to work.

Rob_extr_rmna <- na.omit(Rob_extr)
Rob_mcr <- MCR(Rob_extr_rmna, method = 'unweight', plot = FALSE)

The NAs in this case are in the climate variable columns. I think they are likely generated by coastal or island observations that are classified as non-land in the worldclim 10m data. There are no Nas in 'tax'.

Should na.omit be run over the extraction file 'in code'?
A note to users to do so be added to the documentation?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions