@@ -296,54 +296,6 @@ print.r2_bayes <- function(x, digits = 3, ...) {
296
296
297
297
298
298
299
- # ' @export
300
- print.perf_pca_rotate <- function (x , cutoff = 0.1 , digits = 3 , ... ) {
301
- orig_x <- x
302
- .rotation <- attr(x , " rotation" , exact = TRUE )
303
-
304
- if (.rotation == " none" ) {
305
- insight :: print_color(" # Loadings from Principal Component Analysis (no rotation)\n\n " , " blue" )
306
- } else {
307
- insight :: print_color(sprintf(" # Rotated loadings from Principal Component Analysis (%s-rotation)\n\n " , .rotation ), " blue" )
308
- }
309
-
310
-
311
- xs <- attr(x , " variance" , exact = TRUE )
312
- x <- round(x , digits = digits )
313
-
314
- x <- as.data.frame(apply(x , MARGIN = c(1 , 2 ), function (.y ) {
315
- if (abs(.y ) < cutoff ) {
316
- " "
317
- } else {
318
- as.character(.y )
319
- }
320
- }), stringsAsFactors = FALSE )
321
-
322
- xs <- as.data.frame(t(as.data.frame(round(xs , digits = digits ))))
323
-
324
- colnames(xs ) <- sprintf(" PC%i" , 1 : ncol(xs ))
325
- rownames(xs ) <- c(" Proportion variance" , " Cumulative variance" , " Proportion explained" , " Cumulative explained" )
326
-
327
- print(x , quote = FALSE , ... )
328
- insight :: print_color(" \n (Explained) Variance\n " , " cyan" )
329
- print(xs , ... )
330
-
331
- invisible (orig_x )
332
- }
333
-
334
-
335
-
336
- # ' @export
337
- print.perf_pca <- function (x , digits = 3 , ... ) {
338
- orig_x <- x
339
- x <- as.data.frame(round(x , digits = digits ))
340
- rownames(x ) <- c(" Standard deviation" , " Eigenvalue" , " Proportion variance" , " Cumulative variance" )
341
- print(x , ... )
342
- invisible (orig_x )
343
- }
344
-
345
-
346
-
347
299
# ' @importFrom insight print_color
348
300
# ' @export
349
301
print.icc <- function (x , digits = 3 , ... ) {
0 commit comments