R/weighted_stats_extend_wgt.R

Defines functions weighted_stats_extend_wgt

## File Name: weighted_stats_extend_wgt.R
## File Version: 0.09

weighted_stats_extend_wgt <- function( wgt, mat )
{
    N1 <- nrow(mat)
    N2 <- ncol(mat)
    if ( is.null(wgt) ){
        wgt <- rep( 1, N1 )
    }
    if ( is.vector(wgt) ){
        wgt <- matrix( wgt, nrow=N1, ncol=N2 )
    }
    return(wgt)
}

Try the sirt package in your browser

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

sirt documentation built on May 29, 2024, 8:43 a.m.