plotHistogramTrend: plotHistogramTrend

Description Usage Arguments Examples

View source: R/plotCIs.R

Description

Histogram of trend results from bootstrap process. The histogram shows the trend results expressed as percentage change between the first year (or first period) and the second year (or second period). It shows the zero line (no trend) and also shows the WRTDS estimate of the trend in percent.

Usage

1
2
3
plotHistogramTrend(eList, eBoot, caseSetUp, flux = TRUE, xMin = NA,
  xMax = NA, xStep = NA, printTitle = TRUE, cex.main = 1.1,
  cex.axis = 1.1, cex.lab = 1.1, col.fill = "grey", ...)

Arguments

eList

named list with at least the Daily, Sample, and INFO dataframes. Created from the EGRET package, after running modelEstimation.

eBoot

named list. Returned from wBT.

caseSetUp

data frame. Returned from trendSetUp.

flux

logical if TRUE, plots flux results, if FALSE plots concentration

xMin

minimum bin value, it is good to have the xMin and xMax arguments straddle zero.

xMax

maximum bin value

xStep

step size, should probably be multiples of 10 or 20

printTitle

logical if TRUE, includes title

cex.main

numeric title font size

cex.axis

numeric axis font size

cex.lab

numeric label font size

col.fill

character fill color

...

base R graphical parameters that can be passed to the hist function

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
library(EGRET)
eList <- Choptank_eList
eBoot <- Choptank_eBoot
caseSetUp <- Choptank_caseSetUp
plotHistogramTrend(eList, eBoot, caseSetUp, flux=FALSE)

## Not run: 
caseSetUp <- trendSetUp(eList)
eBoot <- wBT(eList,caseSetUp)
plotHistogramTrend(eList, eBoot, caseSetUp,  
                   flux=FALSE, xMin = -20, xMax = 60, xStep = 5)
plotHistogramTrend(eList, eBoot, caseSetUp, 
                   flux=TRUE, xMin = -20, xMax = 60, xStep = 5)
   
# Using runPairs:
year1 <- 1985
year2 <- 2009          
pairOut_2 <- runPairs(eList, year1, year2, windowSide = 7)
boot_pair_out <- runPairsBoot(eList, pairOut_2, nBoot = 10)

plotHistogramTrend(eList, boot_pair_out,caseSetUp=NA, 
                   flux=TRUE, xMin = -20, xMax = 60, xStep = 5)          

## End(Not run)

USGS-R/EGRETci documentation built on Aug. 15, 2018, 2:08 p.m.