ggally_cor {GGally}R Documentation

Correlation from the Scatter Plot

Description

Estimate correlation from the given data.

Usage

ggally_cor(data, mapping, corAlignPercent = 0.6, corMethod = "pearson",
  corUse = "complete.obs", ...)

Arguments

data

data set using

mapping

aesthetics being used

corAlignPercent

right align position of numbers. Default is 60 percent across the horizontal

corMethod

method suppied to cor function

corUse

use supplied to cor function

...

other arguments being supplied to geom_text

Author(s)

Barret Schloerke schloerke@gmail.com

Examples

data(tips, package = "reshape")
 ggally_cor(tips, mapping = ggplot2::aes_string(x = "total_bill", y = "tip"))
 ggally_cor(
   tips,
   mapping = ggplot2::aes_string(x = "total_bill", y = "tip", size = 15, colour = "red")
 )
 ggally_cor(
   tips,
   mapping = ggplot2::aes_string(x = "total_bill", y = "tip", color = "sex"),
   size = 5
 )

[Package GGally version 0.5.0 Index]