@@ -107,7 +107,7 @@ format_p_adjust <- function(method) {
107107
108108.p_adjust_tukey <- function (params , stat_column , rank_adjust = 1 , verbose = TRUE ) {
109109 df_column <- colnames(params )[stats :: na.omit(match(c(" df" , " df_error" ), colnames(params )))][1 ]
110- if (length (df_column ) && length(stat_column )) {
110+ if (! is.na (df_column ) && length(stat_column )) {
111111 params $ p <- suppressWarnings(stats :: ptukey(
112112 sqrt(2 ) * abs(params [[stat_column ]]),
113113 nmeans = nrow(params ) / rank_adjust ,
@@ -133,7 +133,7 @@ format_p_adjust <- function(method) {
133133
134134.p_adjust_scheffe <- function (model , params , stat_column , rank_adjust = 1 ) {
135135 df_column <- colnames(params )[stats :: na.omit(match(c(" df" , " df_error" ), colnames(params )))][1 ]
136- if (length (df_column ) && length(stat_column )) {
136+ if (! is.na (df_column ) && length(stat_column )) {
137137 # 1st try
138138 scheffe_ranks <- try(qr(model @ linfct )$ rank , silent = TRUE )
139139
@@ -192,7 +192,7 @@ format_p_adjust <- function(method) {
192192 }
193193 # find degrees of freedom column, if available
194194 df_column <- colnames(params )[stats :: na.omit(match(c(" df" , " df_error" ), colnames(params )))][1 ]
195- if (length (df_column ) == 0 ) {
195+ if (is.na (df_column )) {
196196 return (params )
197197 }
198198 # calculate updated confidence interval level, based on simultaenous
0 commit comments