R/tam_weighted_stats_select.R

Defines functions tam_weighted_stats_select

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

tam_weighted_stats_select <- function(x, w, select)
{
    if ( ! is.null(select) ){
        x <- x[ select ]
        w <- w[ select ]
    }
    #-- remove missing cases
    ind <- which( ! is.na(x) )
    x <- x[ind]
    w <- w[ind]
    #-- output
    res <- list( x=x, w=w)
    return(res)
}

Try the TAM package in your browser

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

TAM documentation built on May 29, 2024, 2:20 a.m.