https://github.com/cran/epiR
Raw File
Tip revision: 828129479cfe576ab5b39426faec1df42a72f19f authored by Mark Stevenson on 08 April 2013, 07:22:08 UTC
version 0.9-48
Tip revision: 8281294
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