plot.fG_ssm: plot

Description Usage Arguments Value Examples

View source: R/plot.fG_ssm.R

Description

visualize fits from an fG_ssm object

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## S3 method for class 'fG_ssm'
plot(
  x,
  what = c("fitted", "predicted"),
  type = 1,
  outlier = TRUE,
  pages = 0,
  ncol = 1,
  ask = TRUE,
  pal = "Zissou1",
  ...
)

Arguments

x

a foieGras ssm fit object with class fG_ssm

what

specify which location estimates to display on time-series plots: fitted or predicted

type

of plot to generate: 1-d time series for lon and lat separately (type = 1, default) or 2-d track plot (type = 2)

outlier

include outlier locations dropped by prefilter (outlier = TRUE, default)

pages

each individual is plotted on a separate page by default (pages = 0), multiple individuals can be combined on a single page; pages = 1

ncol

number of columns to arrange plots when combining individuals on a single page (ignored if pages = 0)

ask

logical; if TRUE (default) user is asked for input before each plot is rendered. set to FALSE to return ggplot objects

pal

hcl.colors palette to use (default: "Zissou1"; type hcl.pals() for options)

...

additional arguments to be ignored

Value

a ggplot object with either: (type = 1) 1-d time series of fits to data, separated into x and y components (units = km) with prediction uncertainty ribbons (2 x SE); or (type = 2) 2-d fits to data (units = km)

Examples

1
2
3
4
5
6
## generate a fG_ssm fit object (call is for speed only)
xs <- fit_ssm(sese2, spdf=FALSE, model = "rw", time.step=72, 
control = ssm_control(se = FALSE, verbose = 0))

plot(xs, what = "f", type = 1)
plot(xs, what = "p", type = 2)

foieGras documentation built on April 27, 2021, 1:05 a.m.