ggassoc_scatter: Scatter plot with a smoothing line

View source: R/ggassoc_scatter.R

ggassoc_scatterR Documentation

Scatter plot with a smoothing line

Description

Displays of scatter plot and adds a smoothing line, using ggplot2.

Usage

ggassoc_scatter(data, mapping, axes.labs=TRUE, ticks.labs=TRUE,
text.size=3)

Arguments

data

dataset to use for plot

mapping

aesthetic being used. It must specify x and y.

axes.labs

Whether to display the labels of the axes, i.e. the names of x and y. Default is TRUE.

ticks.labs

Whether to display the labels of the categories of x and y. Default is TRUE.

text.size

Size of the association measure. If NULL, the text is not added to the plot.

Details

Kendall's tau rank correlation between x and y is displayed in upper-left corner of the plot.

Smoothing is performed with gam.

This function can be used as a high-level plot with ggduo and ggpairs functions of the GGally package.

Value

a ggplot object

Author(s)

Nicolas Robette

See Also

assoc.twocont, condesc, assoc.yx, darma, ggpairs

Examples

data(decathlon, package="FactoMineR")
ggassoc_scatter(decathlon, mapping = ggplot2::aes(x = Javeline, y = Points))

GDAtools documentation built on March 18, 2022, 5:13 p.m.