R/mice_imputation_extract_list_arguments.R

Defines functions mice_imputation_extract_list_arguments

## File Name: mice_imputation_extract_list_arguments.R
## File Version: 0.19


#---- extract list argument
mice_imputation_extract_list_arguments <- function( micearg, vname, miceargdefault )
{
    if( is.list(micearg) ){
        if ( ! is.null(micearg[[vname]] ) ){
            micearg <- micearg[[vname]]
        } else {
            micearg <- miceargdefault
        }
    }
    if ( is.null(micearg) ){
        micearg <- miceargdefault
    }
    return(micearg)
}

#--- deprecated function
.extract.list.arguments <- mice_imputation_extract_list_arguments

Try the miceadds package in your browser

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

miceadds documentation built on May 29, 2024, 11:05 a.m.