Learn R Programming

Ternary (version 2.3.3)

XYToTernary: Cartesian coordinates to ternary point

Description

Convert cartesian (x, y) coordinates to a point in ternary space.

Usage

XYToTernary(
  x,
  y,
  direction = getOption("ternDirection", 1L),
  region = getOption("ternRegion", ternRegionDefault)
)

XYToHoldridge(x, y)

XYToPetPrec(x, y)

Value

XYToTernary() Returns the ternary point(s) corresponding to the specified x and y coordinates, where a + b + c = 1.

Arguments

x, y

Numeric values giving the x and y coordinates of a point or points.

direction

(optional) Integer specifying the direction that the current ternary plot should point: 1, up; 2, right; 3, down; 4, left.

region

(optional) Named list of length two specifying the the minimum and maximum values of each ternary axis to be drawn (e.g. list(min = c(40, 0, 0), max = c(100, 60, 60)); or a set of coordinates in a format accepted by TernaryPoints(). The plotted region will correspond to the smallest equilateral triangle that encompasses the specified ranges or coordinates.

See Also

Other coordinate translation functions: ReflectedEquivalents(), TernaryCoords(), TriangleCentres()

Examples

Run this code
XYToTernary(c(0.1, 0.2), 0.5)

Run the code above in your browser using DataLab