Chicago / west-nile-virus-predictions

Algorithm to predict repeated positive results for West Nile Virus for mosquitoes captured in traps across Chicago.
MIT License
14 stars 1 forks source link

Remove references to geneorama #40

Open geneorama opened 7 years ago

geneorama commented 7 years ago

I'm using my package here and there, this should be sanitized of geneorama functions. The only really important function is the shift function, which has a data.table analogue, but I wrote my version first and our versions are different. So that could be confusing if geneorama were not available.

Functions being used:

The shift function:

shift <- function (x, offset = 1, pad = NA) {
    r <- (1 + offset):(length(x) + offset)
    r[r < 1] <- NA
    ans <- x[r]
    ans[is.na(ans)] <- pad
    return(ans)
}