https://github.com/cran/epiR
Raw File
Tip revision: 82500f9b67aac8fc294204715c7b8236c08e044e authored by Mark Stevenson on 04 February 2014, 22:44:53 UTC
version 0.9-57
Tip revision: 82500f9
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