https://github.com/cran/epiR
Raw File
Tip revision: 34a6d6faa0fb3f6cd0c1868f2245928efd8507c1 authored by Mark Stevenson on 26 August 2010, 00:00:00 UTC
version 0.9-27
Tip revision: 34a6d6f
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