do_corr

do_corr(
  x,
  y = NULL,
  method = c("spearman", "kendall", "pearson")[1],
  use = "complete.cases",
  conf = 0.95,
  R = 999,
  sim = "balanced",
  ci_type = c("bca"),
  p_adjust_method = p.adjust.methods[1],
  ss = p05plus
)

# S3 method for do_corr
print(
  x,
  ...,
  digits = 2,
  digits_p = 3,
  ss = attr(x, "ss"),
  p_col = c("p", "p.adj")
)

# S3 method for do_corr
pander(
  x,
  ...,
  caption = "The results of correlation analysis",
  digits = 2,
  digits_p = 3,
  ss = attr(x, "ss"),
  p_col = c("p", "p.adj")
)

Arguments

x, y, method, use, conf, R, sim, ci_type, p_adjust_method, ss

# FIXME: not documented

Examples

data(iris) ans <- do_corr(iris[, -5]) ans
#> variables cor ci_low ci_upp p p.adj n #> 1 Sepal.Length - Sepal.Width -0.17 -0.32 -0.02 0.041 * 0.041 * 150 #> 2 Sepal.Length - Petal.Length 0.88 0.84 0.91 <0.001 *** <0.001 *** 150 #> 3 Sepal.Length - Petal.Width 0.83 0.78 0.87 <0.001 *** <0.001 *** 150 #> 4 Sepal.Width - Petal.Length -0.31 -0.46 -0.15 <0.001 *** <0.001 *** 150 #> 5 Sepal.Width - Petal.Width -0.29 -0.44 -0.12 <0.001 *** <0.001 *** 150 #> 6 Petal.Length - Petal.Width 0.94 0.92 0.95 <0.001 *** <0.001 *** 150 #> method #> 1 spearman #> 2 spearman #> 3 spearman #> 4 spearman #> 5 spearman #> 6 spearman
library(pander) pander(ans)
#> #> -------------------------------------------------------------------- #> variables cor ci_low ci_upp p #> ----------------------------- ------- -------- -------- ------------ #> Sepal.Length - Sepal.Width -0.17 -0.32 -0.02 0.041 * #> #> Sepal.Length - Petal.Length 0.88 0.84 0.91 <0.001 *** #> #> Sepal.Length - Petal.Width 0.83 0.78 0.87 <0.001 *** #> #> Sepal.Width - Petal.Length -0.31 -0.46 -0.15 <0.001 *** #> #> Sepal.Width - Petal.Width -0.29 -0.44 -0.12 <0.001 *** #> #> Petal.Length - Petal.Width 0.94 0.92 0.95 <0.001 *** #> -------------------------------------------------------------------- #> #> Table: The results of correlation analysis (continued below) #> #> #> ----------------------------- #> p.adj n method #> ------------ ----- ---------- #> 0.041 * 150 spearman #> #> <0.001 *** 150 spearman #> #> <0.001 *** 150 spearman #> #> <0.001 *** 150 spearman #> #> <0.001 *** 150 spearman #> #> <0.001 *** 150 spearman #> ----------------------------- #>