plot.fluss: Functions for bulk plotting of concentration change with time...

View source: R/plot.fluss.R

plot.flussR Documentation

Functions for bulk plotting of concentration change with time as kind of diagnostic plots for flux rate calculations

Description

Bulk plotting of concentration change with time adding color and symboling for acting as a diagnostic plot for the flux rate estimation functions (flux, flux.odae, flux.conv) in this package.

Usage

## S3 method for class 'fluss'
plot(x, subs, dims, folder = getwd(), xlims = NULL, ...)

## S3 method for class 'flux'
plot(x, zero.line, note = "", margin = 0.2, xlims = NULL, ...)

## S3 method for class 'fluxes'
plot(x, dims, ghg = "all", subs = NULL, folder = getwd(), 
xlims = NULL, ask = TRUE, ...)

## S3 method for class 'fluxx'
plot(x, ...)

## S3 method for class 'fluxxes'
plot(x, dims, subs = NULL, folder = getwd(), ask = TRUE, ...)

Arguments

x

Object of class fluss that is returned by flux or object of class flux that is returned by flux.conv. In case of the latter, the function has to be applied to a list of flux extimation results via lapply or the like.

subs

Single character value or character value specifying the factors that shall be used for subsetting the plots into plates (that are stored as pdf files to a folder specified in folder). Must be names of columns of the original data that have been used to partition the data into chunks and that are part of the naming of the data chunks (see flux for details.). When there are only few chamber measurements that shall be plotted to the screen set subs to NULL. This is default behaviour for plot.fluxes

dims

Integer vector with two elements that specify the mfrow setting (see par for details) during the plotting of the single plates into pdf files. For all single plots to fit on the plate the product of the two entries has to be equal or higher the number of chamber measurements that are in the data in each partition according to subs.

folder

Character string giving the path to the folder were the files have to be stored. The names of the pdf files are generated automatically.

xlims

Two entry numeric vector specifying the x-axes limits for all plots. Defaults to NULL in which case it is derived from the data itself. The y-axes limits are always set according to the range of the concentration data \pm 20

...

further arguments passed through to plot.flux (see below) or to plot.default.

zero.line

The y-axes position of a horizontal line that reflects the ambient concentration of the plotted gas species. When using plot.fluss this is determined automatically from x.

note

A note that shall appear in the plots. Typically not a fixed value but a value that changes from plot to plot. See example.

margin

Numeric between 0 and 1. Specifies the empty space within the diagnostic plots on the y-axis.

ghg

Character value or an up to three entry vector specifying which ghg should be plotted. Note that only ghg fluxes that were estimated can be plotted.

ask

Logical; if TRUE, the user is asked before starting to plot the concentration data for the next ghg, see par(ask=.) and examples.

Details

Typically plot.fluss will be used. However, for lower level plotting the function plot.flux that also does the plotting within plot.fluss is provided as a separate function.

Value

The function is invoked for its side effects and does not return anything.

Author(s)

Gerald Jurasinski <gerald.jurasinski@uni-rostock.de>

See Also

chop, flux, flux.odae, flux.conv

Examples

## load example data
data(tt.pre)

## extract field concentration measurements
gcd <- tt.pre[tt.pre$sampletype_a=="P",]

## partition the data into data tables per chamber measurement
# then do the partitioning
gcd.parts <- chop(gcd, factors = c("date", "spot", "veg"), 
nmes = c("date", "veg", "spot"))

## calculate flux rates for methane
# first define CH4 range limit (alternatively use flux.calib)
CH4.lim <- 30
# do the flux rate estimation
vp.CH4 <- list(CH4 = "CH4ppb", time = "time_min", CH4.gcq = "CH4Code", 
volume = "cham_vol", t.air = "temp_dC", area = "cham_area", p.air = 101325)
flux.CH4 <- flux(gcd.parts, var.par = vp.CH4, co2ntrol = NULL, 
range.lim=CH4.lim)

## look at the results table
flux.CH4

## plot the concentration-change-with-time-plots as kind of diagnostic
plot(flux.CH4, dims = c(3,6))

flux documentation built on June 26, 2022, 9:05 a.m.