Learn R Programming

SWMPr (version 2.1.5)

plot.swmpr: Plot swmpr data

Description

Plot a time series of parameters in a swmpr object

Usage

"plot"(x, type = "l", ...)
"lines"(x, ...)

Arguments

x
input swmpr object
type
chr string for type of plot, default 'l'. See plot.
...
other arguments passed to par, plot.default

Details

The swmpr method for plotting is a convenience function for plotting a univariate time series. Conventional plotting methods also work well since swmpr objects are also data frames. See the examples for use with different methods.

See Also

plot

Examples

Run this code
## get data
data(apadbwq)
swmp1 <- apadbwq

## subset
dat <- subset(swmp1, select = 'do_mgl', 
 subset = c('2013-07-01 00:00', '2013-07-31 00:00'))

## plot using swmpr method, note default line plot
plot(dat)

## plot using formula method
plot(do_mgl ~ datetimestamp, dat)

## plot using defualt, add lines
plot(dat, type = 'n')
lines(dat, col = 'red')

Run the code above in your browser using DataLab