R: Correlation from the Scatter Plot

ggally_cor {GGally} | R Documentation

## Correlation from the Scatter Plot

### Description

Estimate correlation from the given data.

### Usage

    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` supplied 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

     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
     )

[Package GGally version 1.3.2 Index]