Learn R Programming

sptotal (version 1.0.1)

plot.predict.slmfit: Create a default map from predictions

Description

Creates a default map for the predictions of unobserved sites. Note that all predictions are stored in a data frame in the output of predict.slmfit(). Therefore, if a user would like to create his or her own plot, they can easily do so using this data frame.

Usage

# S3 method for predict.slmfit
plot(x, ...)

Value

a plot with x-coordinates on the x-axis and y-coordinates on the y-axis that is coloured by predictions, with points with an X denoting that a site was sampled and filled circles denoting unsampled sites.

Arguments

x

the output of the predict.slmfit() function, of class predict.slmfit

...

further arguments passed to or from other methods.

Examples

Run this code
data(exampledataset) ## load a toy data set
slmobj <- slmfit(formula = counts ~ pred1 + pred2, data = exampledataset,
xcoordcol = 'xcoords', ycoordcol = 'ycoords', areacol = 'areavar')
predobj <- predict(slmobj)
plot(predobj)

Run the code above in your browser using DataLab