You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The error message was:
Error in pseudoAbsences(xy = presences, background = bg.profiled$absence, :
xy and background do not have the same length
Also this warning message appear running backgroundGrid lines:
Warning message:
In if (class(xy) == "matrix") xy <- as.data.frame(xy) :
the condition has length> 1 and only the first element will be used
PD: I am using R 4.0.0.
The text was updated successfully, but these errors were encountered:
Following the example in Tackling Uncertainties of Species Distribution Model Projections with
Package mopa.
library(mopa)
destfile <- tempfile()
url <- paste0("https://raw.githubusercontent.com/SantanderMetGroup/", "mopa/master/data/biostack.rda")
download.file(url, destfile)
load(destfile, verbose = TRUE)
data(Oak_phylo2)
presences <- Oak_phylo2$H11
bg <- backgroundGrid(raster = biostack$baseline$bio1)
bg.subdomain <- backgroundGrid(raster = biostack$baseline$bio1,
spatial.subset = extent(c(-10, 35, 45, 65)))
bg.species <- backgroundGrid(raster = biostack$baseline$bio1,
spatial.subset = presences)
bg.profiled <- OCSVMprofiling(xy = presences,
varstack = biostack$baseline,
background = bg$xy)
pa_RSEP <- pseudoAbsences(xy = presences,
background = bg.profiled$absence,
realizations = 10,
exclusion.buffer = 0.249,
prevalence = -0.5)
The error message was:
Error in pseudoAbsences(xy = presences, background = bg.profiled$absence, :
xy and background do not have the same length
Also this warning message appear running backgroundGrid lines:
Warning message:
In if (class(xy) == "matrix") xy <- as.data.frame(xy) :
the condition has length> 1 and only the first element will be used
PD: I am using R 4.0.0.
The text was updated successfully, but these errors were encountered: