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 Sept. 18, 2023, 2:01 p.m.