correlation_scatter: Plot a Scatter Plot with Correlation Coefficient

Description Usage Arguments Value Examples

View source: R/corrplot.R

Description

Plot a scatter plot with correlation coefficient added as annotations. Wrapper around the ggplot and cor function.

Usage

1
2
3
4
5
6
7
8
9
correlation_scatter(
  data,
  x = NULL,
  y = NULL,
  group = NULL,
  cor_method = "pearson",
  use = "everything",
  verbose = TRUE
)

Arguments

data

A tibble or dataframe

x

First numeric variable

y

Second numeric variable

group

Variable used for grouping

cor_method

Which correlation coefficient to calculate

use

Method for handling missing values

verbose

Print relevant information

Value

a ggplot object

Examples

1
2
correlation_scatter(iris, x="Sepal.Length", y="Sepal.Width", group="Species")
correlation_scatter(iris, cor_method="pearson")

wu-2018/corrplot documentation built on Jan. 1, 2021, 12:52 p.m.