Description Usage Arguments Value Examples
Produces a correlation matrix table.
1 2 |
data |
data.frame containing the variables for which the correlation matrix should be calculated. |
use |
Which observations should be used? use="pairwise" is the default value and will do pairwise deletion of cases. use="complete" will select only complete cases. |
method |
Which correlation type should be used? method="pearson" is the default value. The alternatives to be passed to cor are "spearman" and "kendall". |
round |
numeric values that denotes to what decimal point should be rounded. |
significance |
character vector that specifies if p-values and/or significance stars should be included in the table. ="NA" displays no significances. ="stars" displays significance stars. ="p-values" displays p-values and =c("stars", "p-values") displays both stars and p-values. |
sd |
logical value that toggles Whether the standard deviation should be displayed in the diagonal of the correlation matrix. |
mean.sd.cols |
logical value that toggles Whether additional mean and standard columns should be included in the table. |
A dataframe comprising the correlation matrix table.
1 2 3 4 5 6 7 8 9 10 11 12 | data(mydata)
corTable(mydata[,1:4])
corTable(mydata[,1:4], method = "kendall")
corTable(mydata[,1:4], sd = TRUE)
corTable(mydata[,1:4], use = "complete")
corTable(mydata[,1:4], significance = NA)
corTable(mydata[,1:4], significance = c("stars", "p-values"))
corTable(mydata[,1:4], round = 4)
corTable(mydata[,1:4], mean.sd.cols = TRUE)
(cor.tab <- corTable(mydata[,1:4], significance = "stars", mean.sd.cols = TRUE))
#saveTable(cor.tab, "corTab.rtf")
|
(1) (2) (3) (4)
1. item1 "-" "" "" ""
2. item2 "0.44***" "-" "" ""
3. item3 "0.39***" "0.26***" "-" ""
4. item4 "0.31***" "0.14** " "0.21***" "-"
(1) (2) (3) (4)
1. item1 "-" "" "" ""
2. item2 "0.39***" "-" "" ""
3. item3 "0.32***" "0.25***" "-" ""
4. item4 "0.27***" "0.14** " "0.2***" "-"
(1) (2) (3) (4)
1. item1 "(0.62)" "" "" ""
2. item2 "0.44***" "(0.61)" "" ""
3. item3 "0.39***" "0.26***" "(0.63)" ""
4. item4 "0.31***" "0.14** " "0.21***" "(0.6)"
(1) (2) (3) (4)
1. item1 "-" "" "" ""
2. item2 "0.44***" "-" "" ""
3. item3 "0.39***" "0.26***" "-" ""
4. item4 "0.31***" "0.14** " "0.21***" "-"
(1) (2) (3) (4)
1. item1 "-" "" "" ""
2. item2 "0.44" "-" "" ""
3. item3 "0.39" "0.26" "-" ""
4. item4 "0.31" "0.14" "0.21" "-"
(1) (2) (3) (4)
1. item1 "-" "" "" ""
2. item2 "0.44*** (< 0.001)" "-" "" ""
3. item3 "0.39*** (< 0.001)" "0.26*** (< 0.001)" "-" ""
4. item4 "0.31*** (< 0.001)" "0.14** (0.001)" "0.21*** (< 0.001)" "-"
(1) (2) (3) (4)
1. item1 "-" "" "" ""
2. item2 "0.4448***" "-" "" ""
3. item3 "0.3863***" "0.2612***" "-" ""
4. item4 "0.3064***" "0.1446** " "0.2065***" "-"
M SD (1) (2) (3) (4)
1. item1 "0.35" "0.62" "-" "" "" ""
2. item2 "0.35" "0.61" "0.44***" "-" "" ""
3. item3 "0.39" "0.63" "0.39***" "0.26***" "-" ""
4. item4 "0.36" "0.6" "0.31***" "0.14** " "0.21***" "-"
M SD (1) (2) (3) (4)
1. item1 "0.35" "0.62" "-" "" "" ""
2. item2 "0.35" "0.61" "0.44***" "-" "" ""
3. item3 "0.39" "0.63" "0.39***" "0.26***" "-" ""
4. item4 "0.36" "0.6" "0.31***" "0.14** " "0.21***" "-"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.