Learn R Programming

isopleuros (version 1.4.0)

coordinates_cartesian: Cartesian Coordinates

Description

Computes cartesian coordinates.

Usage

coordinates_cartesian(x, y, ...)

# S4 method for numeric,numeric coordinates_cartesian(x, y)

# S4 method for ANY,missing coordinates_cartesian(x, xlab = NULL, ylab = NULL)

Value

A list with the components:

xA numeric vector of x coordinates.
yA numeric vector of y coordinates.
zA numeric vector of z coordinates.

Arguments

x, y

A numeric vector giving the x and y ternary coordinates of a set of points. If y is missing, an attempt is made to interpret x in a suitable way (see grDevices::xy.coords()).

...

Currently not used.

xlab, ylab

A character string specifying the names for the x and y variables to be extracted.

Author

N. Frerebeau

See Also

Other coordinates: coordinates_ternary()

Examples

Run this code
## Compositional data
coda <- data.frame(
  x = c(1, 0, 0, 1/3),
  y = c(0, 1, 0, 1/3),
  z = c(0, 0, 1, 1/3)
)

## Ternary coordinates
(tern <- coordinates_ternary(coda))

## Cartesian coordinates
(cart <- coordinates_cartesian(tern))

Run the code above in your browser using DataLab