correlation: Graph: Plot correlation

View source: R/correlation_analysis.R

correlationR Documentation

Graph: Plot correlation

Description

Correlation analysis function (Pearson or Spearman)

Usage

correlation(
  x,
  y,
  method = "pearson",
  ylab = "Dependent",
  xlab = "Independent",
  theme = theme_classic(),
  textsize = 12,
  pointsize = 5,
  pointshape = 21,
  linesize = 0.8,
  fill.ic = "gray70",
  alpha.ic = 0.5,
  ic = TRUE,
  title = NA,
  fontfamily = "sans"
)

Arguments

x

Numeric vector with independent variable

y

Numeric vector with dependent variable

method

Method correlation (default is Pearson)

ylab

Variable response name (Accepts the expression() function)

xlab

Treatments name (Accepts the expression() function)

theme

ggplot2 theme (default is theme_classic())

textsize

Axis text size

pointsize

Point size

pointshape

shape format

linesize

line size

fill.ic

Color interval of confidence

alpha.ic

confidence interval transparency level

ic

Add interval of confidence

title

title

fontfamily

Font family

Value

The function returns a graph for correlation

Author(s)

Gabriel Danilo Shimizu, shimizu@uel.br

Leandro Simoes Azeredo Goncalves

Examples

data("aristolochia")
with(aristolochia, correlation(trat,resp))

AgroReg documentation built on May 29, 2024, 9:13 a.m.