R/apaCorrelationTable.R
apa.cor.table.RdCreates a correlation table in APA style with means and standard deviations
apa.cor.table(data, filename = NA, table.number = NA, show.conf.interval = TRUE, landscape = TRUE)
| data | Project data frame |
|---|---|
| filename | (optional) Output filename document filename (must end in .rtf or .doc only) |
| table.number | Integer to use in table number output line |
| show.conf.interval | (TRUE/FALSE) Display confidence intervals in table. This argument is deprecated and will be removed from later versions. |
| landscape | (TRUE/FALSE) Make RTF file landscape |
APA table object
# View top few rows of attitude data set head(attitude)#> rating complaints privileges learning raises critical advance #> 1 43 51 30 39 61 92 45 #> 2 63 64 51 54 63 73 47 #> 3 71 70 68 69 76 86 48 #> 4 61 63 45 47 54 84 35 #> 5 81 78 56 66 71 83 47 #> 6 43 55 49 44 54 49 34# Use apa.cor.table function apa.cor.table(attitude)#> #> #> Means, standard deviations, and correlations with confidence intervals #> #> #> Variable M SD 1 2 3 4 #> 1. rating 64.63 12.17 #> #> 2. complaints 66.60 13.31 .83** #> [.66, .91] #> #> 3. privileges 53.13 12.24 .43* .56** #> [.08, .68] [.25, .76] #> #> 4. learning 56.37 11.74 .62** .60** .49** #> [.34, .80] [.30, .79] [.16, .72] #> #> 5. raises 64.63 10.40 .59** .67** .45* .64** #> [.29, .78] [.41, .83] [.10, .69] [.36, .81] #> #> 6. critical 74.77 9.89 .16 .19 .15 .12 #> [-.22, .49] [-.19, .51] [-.22, .48] [-.25, .46] #> #> 7. advance 42.93 10.29 .16 .22 .34 .53** #> [-.22, .49] [-.15, .54] [-.02, .63] [.21, .75] #> #> 5 6 #> #> #> #> #> #> #> #> #> #> #> #> #> #> #> .38* #> [.02, .65] #> #> .57** .28 #> [.27, .77] [-.09, .58] #> #> #> Note. M and SD are used to represent mean and standard deviation, respectively. #> Values in square brackets indicate the 95% confidence interval. #> The confidence interval is a plausible range of population correlations #> that could have caused the sample correlation (Cumming, 2014). #> * indicates p < .05. ** indicates p < .01. #> #>apa.cor.table(attitude, show.conf.interval=FALSE)#> The ability to suppress reporting of reporting confidence intervals has been deprecated in this version. #> The function argument show.conf.interval will be removed in a later version.#> #> #> Means, standard deviations, and correlations with confidence intervals #> #> #> Variable M SD 1 2 3 4 #> 1. rating 64.63 12.17 #> #> 2. complaints 66.60 13.31 .83** #> [.66, .91] #> #> 3. privileges 53.13 12.24 .43* .56** #> [.08, .68] [.25, .76] #> #> 4. learning 56.37 11.74 .62** .60** .49** #> [.34, .80] [.30, .79] [.16, .72] #> #> 5. raises 64.63 10.40 .59** .67** .45* .64** #> [.29, .78] [.41, .83] [.10, .69] [.36, .81] #> #> 6. critical 74.77 9.89 .16 .19 .15 .12 #> [-.22, .49] [-.19, .51] [-.22, .48] [-.25, .46] #> #> 7. advance 42.93 10.29 .16 .22 .34 .53** #> [-.22, .49] [-.15, .54] [-.02, .63] [.21, .75] #> #> 5 6 #> #> #> #> #> #> #> #> #> #> #> #> #> #> #> .38* #> [.02, .65] #> #> .57** .28 #> [.27, .77] [-.09, .58] #> #> #> Note. M and SD are used to represent mean and standard deviation, respectively. #> Values in square brackets indicate the 95% confidence interval. #> The confidence interval is a plausible range of population correlations #> that could have caused the sample correlation (Cumming, 2014). #> * indicates p < .05. ** indicates p < .01. #> #>apa.cor.table(attitude, filename="ex.CorTable1.doc")#> #> #> Means, standard deviations, and correlations with confidence intervals #> #> #> Variable M SD 1 2 3 4 #> 1. rating 64.63 12.17 #> #> 2. complaints 66.60 13.31 .83** #> [.66, .91] #> #> 3. privileges 53.13 12.24 .43* .56** #> [.08, .68] [.25, .76] #> #> 4. learning 56.37 11.74 .62** .60** .49** #> [.34, .80] [.30, .79] [.16, .72] #> #> 5. raises 64.63 10.40 .59** .67** .45* .64** #> [.29, .78] [.41, .83] [.10, .69] [.36, .81] #> #> 6. critical 74.77 9.89 .16 .19 .15 .12 #> [-.22, .49] [-.19, .51] [-.22, .48] [-.25, .46] #> #> 7. advance 42.93 10.29 .16 .22 .34 .53** #> [-.22, .49] [-.15, .54] [-.02, .63] [.21, .75] #> #> 5 6 #> #> #> #> #> #> #> #> #> #> #> #> #> #> #> .38* #> [.02, .65] #> #> .57** .28 #> [.27, .77] [-.09, .58] #> #> #> Note. M and SD are used to represent mean and standard deviation, respectively. #> Values in square brackets indicate the 95% confidence interval. #> The confidence interval is a plausible range of population correlations #> that could have caused the sample correlation (Cumming, 2014). #> * indicates p < .05. ** indicates p < .01. #> #>apa.cor.table(attitude, show.conf.interval=FALSE, filename="ex.CorTable2.doc")#> The ability to suppress reporting of reporting confidence intervals has been deprecated in this version. #> The function argument show.conf.interval will be removed in a later version.#> #> #> Means, standard deviations, and correlations with confidence intervals #> #> #> Variable M SD 1 2 3 4 #> 1. rating 64.63 12.17 #> #> 2. complaints 66.60 13.31 .83** #> [.66, .91] #> #> 3. privileges 53.13 12.24 .43* .56** #> [.08, .68] [.25, .76] #> #> 4. learning 56.37 11.74 .62** .60** .49** #> [.34, .80] [.30, .79] [.16, .72] #> #> 5. raises 64.63 10.40 .59** .67** .45* .64** #> [.29, .78] [.41, .83] [.10, .69] [.36, .81] #> #> 6. critical 74.77 9.89 .16 .19 .15 .12 #> [-.22, .49] [-.19, .51] [-.22, .48] [-.25, .46] #> #> 7. advance 42.93 10.29 .16 .22 .34 .53** #> [-.22, .49] [-.15, .54] [-.02, .63] [.21, .75] #> #> 5 6 #> #> #> #> #> #> #> #> #> #> #> #> #> #> #> .38* #> [.02, .65] #> #> .57** .28 #> [.27, .77] [-.09, .58] #> #> #> Note. M and SD are used to represent mean and standard deviation, respectively. #> Values in square brackets indicate the 95% confidence interval. #> The confidence interval is a plausible range of population correlations #> that could have caused the sample correlation (Cumming, 2014). #> * indicates p < .05. ** indicates p < .01. #> #>