plotStumpTemp: plotStumpTemp

View source: R/plotStumpTemp.R

plotStumpTempR Documentation

plotStumpTemp

Description

Plot Stump Temperature Time Series. This function plots stump temperature data over time, either in days or months. The data can be grouped by month and/or averaged over each month.

Usage

plotStumpTemp(
  model,
  type = c("days", "month"),
  startDate = as.Date("2000-01-01"),
  groupMonth = F,
  avgMonth = F
)

Arguments

model

Output from the piner function.

type

A character vector specifying the type of time series plot. Can be 'days' or 'month'. Default is 'days'.

startDate

A Date object representing the starting date of the time series. Default is "2000-01-01". Only used when displaying Months (see details).

groupMonth

A logical value. If TRUE, the data will be grouped by Month and displayed as a single point for each group. Default is FALSE.

avgMonth

A logical value. If TRUE, the data will be averaged for each month across the entire time series. Default is FALSE.

Details

The 'startDate', 'groupMonth', and 'avgMonth' arguments are only used when selecting type = 'month'. The 'startDate' argument is used to set the starting date of the data and should be in the form as.Date(myDate). However, if type = 'days' then the 'startDate', 'groupMonth', and 'avgMonth' arguments are ignored.

Value

A ggplot object displaying the stump temperature time series.

Examples

data(weatherData)
mod <- piner(data = weatherData,
             npop = 100,
             ntimes = 10,
             species = 2,
             output = 0)

plotStumpTemp(model = mod, startDate = as.Date("2020-01-01"), type = "month", avgMonth = TRUE)

Alessandra23/pineR documentation built on Aug. 26, 2023, 8 a.m.