R/ICnumeric_class.R

# IC class and show method

setClass( "ICnumeric" , contains="numeric" )

setMethod( "show" , "ICnumeric" , function(object) {
    cat( round( object , 1 ) )
    if ( !is.null( attr(object,"se") ) ) {
        cat( concat( " ±" , round( attr(object,"se") , 1 ) ) )
    }
    cat("\n")
} )
rmcelreath/rethinking documentation built on Aug. 26, 2024, 5:54 p.m.