https://github.com/cran/epiR
Raw File
Tip revision: 2ba5b94e6802fb0cdadd26de1b38aa1d2ec482a9 authored by Mark Stevenson on 31 March 2009, 06:34:47 UTC
version 0.9-15
Tip revision: 2ba5b94
epi.offset.R
"epi.offset" <- function(id.names)
    {   total <- length(id.names)
        counts <- as.vector(table(id.names))
        offset <- c(1)
        for (i in 2:length(counts)-1)
                {var <- counts[i] + offset[i]
                 offset <- c(offset, var)   
                    }
                offset <- c(offset, total)
                return(offset)
                }   
back to top