Description Usage Arguments Value Author(s) Examples
Title
1 2 3 4 |
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 |
Correlation table in console or file
Dominik Vogel
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.