plot_turbSSC: plot_turbSSC. Create plots of sediment vs. turbidity.

Description Usage Arguments Details Value Examples

View source: R/plot_turbSSC.R

Description

Function to output scatterplot of SSC vs. turbidity. Output is a single plot or write to PDF.

Usage

1
2
3
4
5
6
7
plot_turbSSC(
  x,
  log.SSC = FALSE,
  log.turb = FALSE,
  siteSelect = NULL,
  PDFout = NULL
)

Arguments

x

A dataframe output from get_localNWIS

log.SSC

Logical, if TRUE, SSC y axis will be log10. Default is FALSE.

log.turb

Logical, if TRUE, Turbidity parameter x axis will be log10. Default is FALSE.

siteSelect

Character, site number to create plots for if x contains multiple sites. Default is NULL.

PDFout

Character. File or full path name of file for plot. If NULL, the default, a plot will be returned in R instead.

Details

Scatterplot of SSC (P80154) vs. Turbidity (Parameter codes 00076, 61028, 63675, 63676, 63677, 63679, 63680, 63681, 63682, 63683, 63684, 72188, 72208, 72209, 72213, 82079, 99872).

Value

If PDFout = NULL, list containing ggplot elements. If PDFout specified, a PDF document containing the plots.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data("exampleData2",package="sedReview")
x <- exampleData2
turbSSC <- plot_turbSSC(exampleData2, siteSelect = "09163500")
## Not run: 
# view plot in Rstudio
print(turbSSC)

# output to file on D drive
plot_turbSSC(exampleData2, siteSelect = "09163500", PDFout = "D:/turbidity.pdf")

## End(Not run)

USGS-R/sedReview documentation built on Aug. 24, 2020, 9 p.m.