discharge | R Documentation |
Computes a cross-section profile of a stream demonstrating distance, velocity, and discharge measurements for the mean-section and mid-section methods.
discharge(distance, depth, velocity, type = c("Mean", "Mid")) ## S3 method for class 'discharge' summary(object, detail = TRUE, ...) ## S3 method for class 'discharge' plot( x, pch = 19, xlab = "Distance (ft)", ylab = "Depth (ft)", newwin = TRUE, ... )
distance |
A vector of distance measurements at intervals across the cross section. |
depth |
A vector of depth measurements at intervals across the cross section. |
velocity |
A vector of velocity measurements at intervals across the cross section. |
type |
A string indicating the discharge method to use. |
object |
An object returned from |
detail |
A logical indicating whether the details of the discharge calculations should be shown ( |
... |
Other arguments to be passed to the |
x |
An object returned from |
pch |
The plotting character to be used for the depth profile. See |
xlab |
A string for labeling the x-axis. |
ylab |
A string for labeling the y-axis. |
newwin |
A logical indicating whether a new graphics window should be opened (only for Windows operating systems). |
discharge
produces a list with a data frame of the original
data, a data frame of computed values, the type=
argument, and a label
for the type of argument. plot
method produce a plot demonstrating
the calculations. summary
returns the total discharge calculation and
detailed intermediate calculations if asked for.
dist1 <- c(seq(0,22,2),24.7) dep1 <- c(0,.9,1.1,1.1,1.1,.9,.9,.9,.9,.9,.9,.7,0) vel1 <- c(0,1.01,1.07,1.22,1.22,1.36,1.28,1.38,1.29,0.88,0.52,0,0) ex1 <- discharge(dist1,dep1,vel1) summary(ex1) plot(ex1) ex1a <- discharge(dist1,dep1,vel1,type="Mid") summary(ex1a) plot(ex1a) dist2 <- c(seq(0,18,2),19.7) dep2 <- c(0,1.2,1.5,1.4,1.4,1.4,1.5,1.7,2,1.5,0) vel2 <- c(0,.53,.76,.95,.90,.98,1.01,.9,.9,0,.0) ex2 <- discharge(dist2,dep2,vel2) summary(ex2) plot(ex2) ex2a <- discharge(dist2,dep2,vel2,type="Mid") summary(ex2a) plot(ex2a)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.