@@ -86,13 +86,15 @@ format.easycormatrix <- function(x,
86
86
stars_only = stars_only
87
87
)
88
88
} else if (type == " pd" ) {
89
- sig [, nums ] <- sapply(sig [, nums ],
89
+ sig [, nums ] <- sapply(
90
+ sig [, nums ],
90
91
insight :: format_pd ,
91
92
stars = stars ,
92
93
stars_only = stars_only
93
94
)
94
95
} else if (type == " BF" ) {
95
- sig [, nums ] <- sapply(sig [, nums ],
96
+ sig [, nums ] <- sapply(
97
+ sig [, nums ],
96
98
insight :: format_bf ,
97
99
stars = stars ,
98
100
stars_only = stars_only
@@ -123,7 +125,7 @@ format.easycormatrix <- function(x,
123
125
footer <- " "
124
126
125
127
# P-adjust
126
- if (isFALSE(attributes(x )$ bayesian )) {
128
+ if (isFALSE(attributes(x )$ bayesian ) && ! isTRUE(attributes( x ) $ smoothed ) ) {
127
129
footer <- paste0(
128
130
" \n p-value adjustment method: " ,
129
131
parameters :: format_p_adjust(attributes(x )$ p_adjust )
@@ -153,10 +155,15 @@ format.easycormatrix <- function(x,
153
155
# ' @keywords internal
154
156
.format_easycorrelation_caption <- function (x , format = NULL ) {
155
157
if (! is.null(attributes(x )$ method )) {
158
+ if (isTRUE(attributes(x )$ smoothed )) {
159
+ prefix <- " Smoothed Correlation Matrix ("
160
+ } else {
161
+ prefix <- " Correlation Matrix ("
162
+ }
156
163
if (is.null(format ) || format == " text" ) {
157
- caption <- c(paste0(" # Correlation Matrix ( " , unique(attributes(x )$ method ), " -method)" ), " blue" )
164
+ caption <- c(paste0(" # " , prefix , unique(attributes(x )$ method ), " -method)" ), " blue" )
158
165
} else {
159
- caption <- paste0(" Correlation Matrix ( " , unique(attributes(x )$ method ), " -method)" )
166
+ caption <- paste0(prefix , unique(attributes(x )$ method ), " -method)" )
160
167
}
161
168
} else {
162
169
caption <- NULL
0 commit comments