fluplot: fluplot: Convenience wrapper for standard trend plot

Description Usage Arguments Value Examples

Description

This models wraps ggplot2 commands into a standard form for making cyclical trend line plots of influenza. Developed only for convenience, the authors encourage individuals to make their own customized graphs as appropriate.

Usage

1
2
3
fluplot(data = NULL, xvar = NULL, yvar = NULL, baseline = y0,
  threshold = y0_ul, linenames = NULL, ylab = "[OUTCOME]",
  title = "[INSERT TITLE]")

Arguments

data

A dataframe class object, must contain time variable, outcome variable

xvar

x-axis variable, must be date class

yvar

y-axis, outcome variable

baseline

second line variable, fitted cyclical trend. Default="y0".

threshold

third line, upper threshold for cyclical trend. Default="y0_ul".

linenames

Defaults specified, but can override. Must be character vector of length=3.

ylab

Character vector for Y-axis label

title

Character vector for Plot Title

Value

an object of class gg, ggplot.

Examples

1
2
3
4
5
require(flumodelr)
fludta <- flumodelr::fludta
flu_fit <- fluserf(fludta, outc = fludeaths, time = yrweek_dt)  
              
fluplot(flu_fit, xvar=yrweek_dt, yvar=fludeaths)

kmcconeghy/flumodelr documentation built on June 7, 2019, 8:47 p.m.