Learn R Programming

groupedHyperframe (version 0.3.5)

visualize_vtrapz: Visualize vtrapz() and cumvtrapz()

Description

Visualize (cumulative) average vertical height of trapezoidal integration.

Usage

visualize_vtrapz(
  x,
  y,
  x_smooth,
  y_smooth,
  xlabs,
  ylabs,
  yname,
  draw.rect,
  draw.v,
  label.v,
  draw.cumv,
  label.cumv,
  ...
)

# S3 method for numeric visualize_vtrapz( x, y, x_smooth = x, y_smooth = y, xlabs, ylabs, yname, draw.rect = TRUE, draw.v = draw.rect, label.v = "Average Vertical Height", draw.cumv = TRUE, label.cumv = "Cumulative Average Vertical Height", ... )

# S3 method for fv visualize_vtrapz(x, ...)

# S3 method for listof visualize_vtrapz(x, ...)

# S3 method for density visualize_vtrapz(x, ...)

# S3 method for stepfun visualize_vtrapz(x, ...)

# S3 method for `function` visualize_vtrapz(x, ..., n = 513L)

# S3 method for loess visualize_vtrapz(x, ..., n = 513L)

# S3 method for smooth.spline visualize_vtrapz(x, ..., n = 513L)

# S3 method for ksmooth visualize_vtrapz(x, ...)

# S3 method for spline visualize_vtrapz(x, ..., n = 513L)

# S3 method for xyVector visualize_vtrapz(x, ...)

Value

The S3 generic function visualize_vtrapz() returns a ggplot object.

Arguments

x

see Usage

y

numeric vector

x_smooth, y_smooth

numeric vectors, smoothed \(x\) and \(y\) values, to beautify the geom_textpath of a stepfun

xlabs, ylabs

functions

yname

(optional) character scalar, name of the function

draw.rect

logical scalar, whether to plot the rectangle, default TRUE

draw.v

logical scalar, whether to plot the average vertical height vtrapz(), default is determined by parameter draw.rect.

label.v, label.cumv

character scalars

draw.cumv

logical scalar, whether to plot the cumulative average vertical height cumvtrapz(), default TRUE

...

additional parameters, currently of no use

n

integer, number of \((x,y)\)-values at which to evaluate, only applicable when the input inherits from the S3 class function, or has an S3 method of predict.*() available.