Correlation from the Scatter Plot

Share:

Description

Estimate correlation from the given data.

Usage

1
2
3
ggally_cor(data, mapping, alignPercent = 0.6, method = "pearson",
  use = "complete.obs", corAlignPercent = NULL, corMethod = NULL,
  corUse = NULL, ...)

Arguments

data

data set using

mapping

aesthetics being used

alignPercent

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

method

method suppied to cor function

use

use supplied to cor function

corAlignPercent

deprecated. Use parameter alignPercent

corMethod

deprecated. Use parameter method

corUse

deprecated. Use parameter use

...

other arguments being supplied to geom_text

Author(s)

Barret Schloerke schloerke@gmail.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
 data(tips, package = "reshape")
 ggally_cor(tips, mapping = ggplot2::aes_string(x = "total_bill", y = "tip"))
 ggally_cor(
   tips,
   mapping = ggplot2::aes(x = total_bill, y = tip),
   size = 15,
   colour = I("red")
 )
 ggally_cor(
   tips,
   mapping = ggplot2::aes_string(x = "total_bill", y = "tip", color = "sex"),
   size = 5
 )

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.