Learn R Programming

ggtern (version 1.0.1.3)

ifthenelse: Internal Function

Description

ifthenelse function takes input arguments x, a and b and returns a

get_tern_extremes determines the limiting ternary coordinates given input coordinates.

arrow_label_formatter is a function that formats the labels directly adjacent to the axes on a ternary plot.

calc_element_plot Calculate the element properties, by inheriting properties from its parents, and compares to whether the local plot overrides this value. Based largely off the calc_element as provided in ggplot2

find_global is a function that conducts a named search for the name object instance, within the env environment. If an instance doesn't exist within the env environment, a search is then conducted within the ggtern and ggplot2 namespaces (in that order).

trytransform is an internal function which attempts to make ternary transformation. If fails, the original data is returned

Internal Function

Internal Function

Check required aesthetics are present This is used by geoms and stats to give a more helpful error message when required aesthetics are missing.

Compute ranges and dimensions of each panel, using the coord.

Modified Geom Smooth Proto

Modified Stat Smooth Proto

Internal functions to get and set the last coordinate system. An internal command for ggtern.

set_last_coord set the last coordinate system.

Internal Function

Exported instance of the imported grid arrow function

Usage

ifthenelse(x, a, b)

get_tern_extremes(coordinates, verbose = F, expand = 0)

arrow_label_formatter(label, suffix = "", ..., sep = "/")

calc_element_plot(element, theme = theme_update(), ..., plot = NULL, verbose = F)

find_global(name, env = environment())

trytransform(data, coord)

remove_outside(data)

sink_density(df, remove = TRUE, coord = stop("coord is required"))

check_required_aesthetics(required, present, name)

panel_scales(panel, i)

calculate_stats(panel, data, layers)

train_ranges(panel, coord)

GeomSmoothtern

GeomTline

GeomLline

GeomRline

GeomConfidence

StatConfidence

cullAndConstrain(data)

GeomDensity2dtern

StatSmoothtern

StatDensity2dtern

StatTline

StatLline

StatRline

get_last_coord()

set_last_coord(new)

Arguments

coordinates
ggtern coordinate system, inheriting "ternary" and "coord" classes.
verbose
logical indicating verbose reporting to console
expand
numeric value to
label
character label
suffix
chacater suffix behind each label
sep
the seperator between label and suffix
element
the element name to calculate
theme
the theme to inherit from
plot
the plot to check locally for theme element, NULL is ok.
...
not used
name
character name of object to search for
env
environment to search within as first priority
data
the dataset
coord
the coordinates
data
data.frame
df
data.frame
remove
boolean remove or make zero
coord
coordinates
character
vector of required aesthetics
character
vector of present aesthetics
name
of object for error message
new
the coordinate system to set
a
argument a
b
argument b
x
argument x

Value

  • data.frame representing the T, L and R amounts (Columns) at each of the tips (extremes) of the ternary plot area (Rows)

    Instance of the named object (if it exists), or NULL (if it does not).

    transformed data

    data.frame

    data.frame

    coordinate system

format

proto object $ draw :function (., data, scales, coordinates, limitarea = F, ...) $ default_stat:function (.) $ objname : chr "smoothtern" $ default_aes :function (.) $ guide_geom :function (.) $ required_aes: chr [1:2] "x" "y" $ draw_legend :function (., data, params, ...) parent: proto object .. parent: proto object

Details

This is a modified version of the original source as provided in ggplot2, which has the same functionality, however, the modification is such that the function now additionally searches within the ggtern namespace prior to the ggplot2 namespace.

get_last_coord is a function that returns the last coordinate system used.

See Also

calc_element

arrow

Examples

Run this code
get_tern_extremes(coordinates = coord_tern())
arrow_label_formatter("TOP","Wt.%",sep="/")
find_global('scale_x_continuous')

Run the code above in your browser using DataLab