Closed FrancescaMancini closed 3 months ago
non-numeric argument to binary operator
This seems to be happening in a couple of places since the most recent version of R. Some core behaviour has changed that we need to pin down. Error in MSI too
Hi @FrancescaMancini,
Is there a way you could replicate this error? remove_bad_species is nested inside lambda_indicator, and I've ran lambda_indicator's example code and example in the vignette and I haven't received any errors.
Thanks
@DylanCarbone this may have been fixed already in another pull request? I suggest that is you are unable to replicate the issue you now, you close the issue
BRCindicators:::getData
was masked bynlme::getData
so that was returning this errorError in getData(input = input, sample_size = sample_size, region = region) : unused arguments (input = input, sample_size = sample_size, region = region)
Once that was fixed, I got the original error from BRCindicators:::remove_bad_species
Error in Occ[, , j] * reliable : non-numeric argument to binary operator
This is the lines that causes it
OccRel <- sapply(1:dim(Occ)[3], function(j) Occ[, , j] * reliable, simplify = "array")
Turns out that all elements of
Occ
are character vectors.