corstars: Title

Description Usage Arguments Value Author(s) Examples

View source: R/output.R

Description

Title

Usage

1
2
3
4
corstars(x, method = c("pearson", "spearman"), removeTriangle = c("upper",
  "lower"), result = c("none", "html", "latex"), labels_rows,
  labels_cols = 1:length(labels_rows) - 1, sig.level = 0.05,
  caption = c("Correlation"), filename = "")

Arguments

x

a matrix containing the data

method

correlation method. "pearson"" or "spearman"" is supported

removeTriangle

remove upper or lower triangle

result

Print result in Console ("none"), generate HTML file ("html"), generate latex file ("latex")

labels_rows

Labels for the rows (i.e., variable names). Length musst be same as number of variables

labels_cols

Labels for columns. Length musst be same as number of variables - 1

sig.level

Significance level (.1 or .05)

caption

Caption for the table

filename

File name to save output to

Value

Correlation table in console or file

Author(s)

Dominik Vogel

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# Console output
corstars(mtcars, method="pearson", removeTriangle="upper", result="none",
   caption = "Correlations",
   sig.level = 0.1,
   labels_rows = c("(1) mpg", "(2) cyl", "(3) disp", "(4) hp",
                   "(5) drat", "(6) wt", "(7) qsec", "(8) vs",
                   "(9) am", "(10) gear",
                   "(11) carb"),
   labels_cols = 1:10)

# HTML output
corstars(mtcars, method="pearson", removeTriangle="upper", result="html",
   caption = "Correlations", filename = "corr.html",
   sig.level = 0.1,
   labels_rows = c("(1) mpg", "(2) cyl", "(3) disp", "(4) hp",
                   "(5) drat", "(6) wt", "(7) qsec", "(8) vs",
                   "(9) am", "(10) gear",
                   "(11) carb"),
   labels_cols = 1:10)

DominikVogel/vogelR documentation built on May 23, 2019, 4:12 p.m.