Closed bschilder closed 3 years ago
check_n_int()
assumes N is either numeric or integer, and does not account for characters.
In some instances, N can also be NA:
Check for characters and convert them to integers:
if (convert_n_int) { #if user wants to correct
msg2 <- paste0(msg," These will be converted to integers.")
message(msg2)
if( is(sumstats_dt$N,"character") ) sumstats_dt[,N:=as.integer(N)] #### solution HERE
sumstats_dt[,N:=round(N,0)]
return(list("sumstats_dt"=sumstats_dt))
}
Bug at this following step, within
check_n_int()
: