Closed Moncef-Boukhecheba closed 3 years ago
@Moncef-Boukhecheba the blocks you specify are too small! Notice the size is in meters! Try something like theRange = 5000
Hi, I also get this same error in some runs (with some random seeds) of 'spatialBlock', even with a sensible block size that does work with other random seeds. E.g., with the same code I posted in this other issue, but changing the random seed near the end:
set.seed(1)
blocks <- spatialBlock(speciesData = as(occdata, "Spatial"), theRange = 200000, k = 5)
# "Error in `[[<-.data.frame`(`*tmp*`, i, value = c(5, 1, 5, 1, 2, 3, 2, : replacement has 85 rows, data has 87"
Hello, thanks for the great package,
I am new to R and species distribution modeling, and I'm encountering a problem with the package :
When I load the species data (with the environmental variables) and try to do the cross validation, I get the error
Error in '[[<-.data.frame'('*tmp*', i, value = c(4, 2, 4, 5, 3, 4, 2, : replacement has 1059 rows, data has 1070
.This is the code I use for the cross validation :
And this is a preview of the data :
The necessary code and data to replicate this issue can be found here https://github.com/Moncef-Boukhecheba/Blockcv-error-example.
I hope you can help me with this problem and find what i am doing wrong.
Thank you.