plot: Plot predictions from FRK analysis

plotR Documentation

Plot predictions from FRK analysis

Description

This function acts as a wrapper around plot_spatial_or_ST. It plots the fields of the Spatial*DataFrame or STFDF object corresponding to prediction and prediction uncertainty quantification. It also uses the @data slot of SRE object to plot the training data set(s), and generates informative, latex-style legend labels for each of the plots.

Usage

plot(x, y, ...)

## S4 method for signature 'SRE,list'
plot(x, y, ...)

## S4 method for signature 'SRE,STFDF'
plot(x, y, ...)

## S4 method for signature 'SRE,SpatialPointsDataFrame'
plot(x, y, ...)

## S4 method for signature 'SRE,SpatialPixelsDataFrame'
plot(x, y, ...)

## S4 method for signature 'SRE,SpatialPolygonsDataFrame'
plot(x, y, ...)

Arguments

x

object of class SRE

y

the Spatial*DataFrame or STFDF object resulting from the call predict(x). Keep in mind that predict() returns a list when method = "TMB"; the element $newdata contains the required Spatial/ST object. If the list itself is passed, you will receive the error: "x" and "y" lengths differ.

...

optional arguments passed on to plot_spatial_or_ST

Value

A list of ggplot objects consisting of the observed data, predictions, and standard errors. This list can then be supplied to, for example, ggpubr::ggarrange().

Examples

## See example in the help file for SRE

FRK documentation built on Sept. 11, 2024, 7:14 p.m.