-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added plot method for metabolism attribute, added metabolim and units…
… attribute to swmpr object
- Loading branch information
Showing
7 changed files
with
155 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
% Generated by roxygen2 (4.1.0): do not edit by hand | ||
% Please edit documentation in R/swmpr_analyze.R | ||
\name{plot_met} | ||
\alias{plot_met} | ||
\alias{plot_met.swmpr} | ||
\title{Plot ecosystem metabolism for a swmpr object} | ||
\usage{ | ||
plot_met(swmpr_in, ...) | ||
|
||
\method{plot_met}{swmpr}(swmpr_in, pretty = TRUE, ...) | ||
} | ||
\arguments{ | ||
\item{swmpr_in}{input swmpr object} | ||
|
||
\item{...}{} | ||
|
||
\item{pretty}{logical indicating use of predefined plot aesthetics} | ||
} | ||
\value{ | ||
A \code{\link[ggplot2]{ggplot}} object which can be further modified. | ||
} | ||
\description{ | ||
Plot gross production, total respiration, and net ecosystem metabolism for a swmpr object. | ||
} | ||
\details{ | ||
A plot will only be returned if the \code{metabolism} attribute for the \code{\link{swmpr}} object is not \code{NULL}. The \code{\link{ecometab}} function is used to create metabolism estimates. See the examples. | ||
|
||
By default, \code{pretty = TRUE} will return a \code{\link[ggplot2]{ggplot}} object with predefined aesthetics. Setting \code{pretty = FALSE} will return the plot with minimal modifications to the \code{\link[ggplot2]{object}}. Use the latter approach for easier customization of the plot. | ||
} | ||
\examples{ | ||
## import water quality and weather data | ||
data(apadbwq) | ||
data(apaebmet) | ||
|
||
## qaqc, combine | ||
wq <- qaqc(apadbwq) | ||
met <- qaqc(apaebmet) | ||
dat <- comb(wq, met) | ||
|
||
## estimate metabolism | ||
res <- ecometab(dat, trace = TRUE) | ||
|
||
## plot | ||
plot_met(res) | ||
} | ||
\seealso{ | ||
\code\link{ecometab} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters