R/frm_prepare_models_descriptives.R

Defines functions frm_prepare_models_descriptives

## File Name: frm_prepare_models_descriptives.R
## File Version: 0.01

frm_prepare_models_descriptives <- function(y)
{
    y <- y[ ! is.na(y) ]
    if ( length(y) > 0 ){
        m0 <- mean( y, na.rm=TRUE )
        sd0 <- stats::sd( y, na.rm=TRUE )
    } else {
        m0 <- 0
        sd0 <- 1
    }
    #--- output
    res <- list(m0=m0, sd0=sd0)
    return(res)
}

Try the mdmb package in your browser

Any scripts or data that you put into this service are public.

mdmb documentation built on March 7, 2023, 6:58 p.m.