plot_cor: Correlation plot

View source: R/plot_cor.R

plot_corR Documentation

Correlation plot

Description

Draw a correlation plot

Usage

plot_cor(
  data,
  x,
  y,
  xlab = x,
  ylab = y,
  r = T,
  p = T,
  xpos = 0.7,
  ypos = 0.7,
  x2pos = xpos,
  y2pos = ypos - 0.1,
  method = "pearson",
  round = 3,
  rsize = 4,
  low.limit = F,
  ci = T
)

Arguments

data

a dataframe to be used

x

a variable for x-axis

y

a variable for y-axis

xlab

x-axis label

ylab

y-axis label

r

correlation coefficient

p

P-value

xpos

relative location of correlation coefficient

ypos

relative location of correlation coefficient

x2pos

relative x location of P-value

y2pos

relative y location of P-value

method

Pearson or Spearman test

round

round

rsize

rsize

low.limit

low.limit

ci

confidence interval

Value

ggplot object


nephroj/medutils documentation built on Feb. 3, 2024, 8:33 a.m.