R/mnlfa_convert_to_list.R

Defines functions mnlfa_convert_to_list

## File Name: mnlfa_convert_to_list.R
## File Version: 0.05


mnlfa_convert_to_list <- function(x, I, names_list=NULL, create_list=FALSE)
{
    if ( ( ! is.list(x) ) | create_list ){
        x0 <- x
        x <- list()
        for (ii in 1:I){
            x[[ii]] <- x0
        }
    }
    if ( ! is.null(names_list) ){
        names(x) <- names_list
    }
    #-- output
    return(x)
}

Try the mnlfa package in your browser

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

mnlfa documentation built on May 18, 2022, 9:05 a.m.