data(exampledataset) ## load a toy data set
slmobj <- slmfit(formula = counts ~ pred1 + pred2, data = exampledataset,
xcoordcol = 'xcoords', ycoordcol = 'ycoords', areacol = 'areavar')
sampleddataset <- na.omit(exampledataset)
svexample <- data.frame(
xcoords = sampleddataset$xcoords,
ycoords = sampleddataset$ycoords,
resids = residuals(slmobj)
)
svdata <- sv(svexample, "xcoords", "ycoords", "resids")
Run the code above in your browser using DataLab