phenoSimPlot: Plot Simulated Phenology Data

Description Usage Arguments Examples

View source: R/phenoSimPlot.R

Description

This function plots the time-series data described with a connectivity matrix.

Usage

1
2
phenoSimPlot(z, connect, add = FALSE, col = "blue", ylim = range(z, na.rm
  = TRUE), pch = 1, lwd = 1)

Arguments

z

A vector of time-series data [n x 1]

connect

The connectivity matrix for the z vector [n x 2]. Each row contains the last and next elements of the time-series. NA values means not connected.

add

logical value indicating whether the plot should be overlaid on the current panel.

col

The color variable as charachter

ylim

Range of the y axis

pch

pch value for the symbols

lwd

lwd value for line tickness

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#Simulate Phenology Data
ssSim <- phenoSim(nSites = 2, #number of sites
                  nTSet = 30, #number of time steps
                  beta = c(1, 2), #beta coefficients
                  sig = .01, #process error
                  tau = .1, #observation error
                  plotFlag = TRUE, #whether plot the data or not
                  miss = 0.05, #fraction of missing data
                  ymax = c(6, 3) #maximum of saturation trajectory
)

#Plot Simulated Data
phenoSimPlot(ssSim$z, ssSim$connect)

phenoCDM documentation built on May 1, 2019, 9:26 p.m.