Learn R Programming

ggtern (version 1.0.6.1)

stat_interpolate_tern: Ternary Interpolation

Description

This is the heavily requested statistic for interpolating between ternary values, results being rendered using contours on a ternary mesh

Usage

stat_interpolate_tern(mapping = NULL, data = NULL,
  geom = "InterpolateTern", position = "identity", na.rm = FALSE,
  n = getOption("tern.mesh.size"), buffer = getOption("tern.mesh.buffer"),
  formula = value ~ poly(x, y, degree = 2, raw = TRUE), method = "lm", ...)

Arguments

mapping
The aesthetic mapping, usually constructed with aes or aes_string. Only needs to be set at the layer level if you are overriding the plot defaults.
data
A layer specific dataset - only needed if you want to override the plot defaults.
geom
The geometric object to use display the data
position
The position adjustment to use for overlapping points on this layer
na.rm
If FALSE (the default), removes missing values with a warning. If TRUE silently removes missing values.
n
Number of grid points in each direction of the mesh. Can be scalar or a length-2 integer vector.
buffer
factor to buffer the mesh, to prevent ugly truncation of contours, 1.0 means no buffering
formula
formula to use in smoothing function, eg. y ~ x, y ~ poly(x, 2), y ~ log(x)
method
smoothing method (function) to use, eg. lm, glm, gam, link{loess} or rlm

Value

  • A data frame with additional column:
  • levelheight of contour

Aesthetics

[results=rd,stage=build]{ggtern:::rd_aesthetics("stat", "InterpolateTern")} geom_interpolate_tern, lm, loess