@@ -34,9 +34,9 @@ md.pattern <- function(x, plot = FALSE)
3434 mpat <- sortR [! duplicated(sortR ), ]
3535 }
3636 if (all(! is.na(x ))) {
37- cat (" /\\ /\\\n { `---' }\n { O O }\n ==> V <==" )
38- cat (" No need for mice. This data set is completely observed.\n " )
39- cat (" \\ \\ |/ /\n `-----'\n\n " )
37+ message (" /\\ /\\\n { `---' }\n { O O }\n ==> V <==" )
38+ message (" No need for mice. This data set is completely observed.\n " )
39+ message (" \\ \\ |/ /\n `-----'\n\n " )
4040 mpat <- t(as.matrix(mpat , byrow = TRUE ))
4141 rownames(mpat ) <- table(pat )
4242 }
@@ -73,7 +73,7 @@ md_pattern <- function(data, omit_complete = TRUE, min_freq = 0.01) {
7373 # mice::md.pattern coerces character/factor to NA
7474 data [[i ]] <- as.numeric(as.factor(data [[i ]]))
7575 }
76- md_pattern <- md.pattern(data , plot = FALSE )
76+ md_pattern <- suppressMessages( md.pattern(data , plot = FALSE ) )
7777 n_miss <- rownames(md_pattern )
7878 if (is.null(n_miss )) {
7979 n_miss <- rep(0 , nrow(md_pattern ))
@@ -84,7 +84,7 @@ md_pattern <- function(data, omit_complete = TRUE, min_freq = 0.01) {
8484 missing_by_var <- md_pattern [nrow(md_pattern ), ]
8585 md_pattern <- md_pattern [, missing_by_var > 0 ]
8686 }
87- md_pattern <- tibble :: as.tibble (md_pattern )
87+ md_pattern <- tibble :: as_tibble (md_pattern )
8888 stopifnot(! exists(" n_miss" , md_pattern ))
8989 md_pattern $ n_miss <- as.numeric(n_miss )
9090 md_pattern $ n_miss [nrow(md_pattern )] <-
0 commit comments