-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Hello,
I'm trying to use the ssdm package to first create an sdm for a single species.
My "env" is a raster stack of 4 variables called "predictors". Here is info on the RasterStack:
class : RasterStack
dimensions : 515, 517, 266255, 4 (nrow, ncol, ncell, nlayers)
resolution : 50000, 50000 (x, y)
extent : -12902817, 12947183, -12875069, 12874931 (xmin, xmax, ymin, ymax)
coord. ref. : +proj=laea +lat_0=15 +lon_0=-80 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0
names : bio5, bio6, bio13, bio14
min values : -58.400699, -460.450056, 9.707436, 0.000000
max values : 431.4254, 224.9177, 742.6622, 185.6807
My occurrence data is a csv file I read into R and the columns are "SPECIES", "LONGITUDE", and "LATITUDE. It's presence only data.
head(Refine)
SPECIES LONGITUDE LATITUDE
1 Acacia greggii -106.0890 28.63500
2 Acacia greggii -114.0000 28.74200
3 Acacia greggii -109.3800 29.43800
4 Acacia greggii -113.5589 28.94528
5 Acacia greggii -113.4461 37.11472
6 Acacia greggii -114.2306 34.29583
I use this code:
SDM <- modelling('GLM',species, predictors, Xcol = 'LONGITUDE', Ycol = 'LATITUDE')
But get this error message after it runs:
Data check ...
No presence column, presence-only data set is supposed.
Pseudo-absence selection will be computed.
done.
Pseudo absence selection...
random selection
done.
Model evaluation...
done.
Model projection...
done.
Model axes contribution evaluation...
done.
Warning messages:
1: In min(pred[which(obs == 1)]) :
no non-missing arguments to min; returning Inf
2: In min(pred[which(obs == 1)]) :
no non-missing arguments to min; returning Inf
3: In cor(predicted.values, o.predicted.values) :
the standard deviation is zero
4: In cor(predicted.values, o.predicted.values) :
the standard deviation is zero
5: In cor(predicted.values, o.predicted.values) :
the standard deviation is zero
6: In cor(predicted.values, o.predicted.values) :
the standard deviation is zero
Any insight would be appreciated? I've looked at the vignette and the details on the commands and I don't understand why it's not working. No map will load.