I was trying to recreate the calculation of zpcum# metrics, found the current code
if (zmax <= zmin) {
d <- rep(0, 9)
}
else {
breaks <- seq(zmin, zmax, (zmax - zmin)/10)
d <- findInterval(z[z > zmin], breaks)
d <- fast_table(d, 10)
d <- d/sum(d) * 100
d <- cumsum(d)[1:9]
d <- as.list(d)
}
names(d) <- paste0("zpcum", 1:9)
}
and noticed the command fast_table. I think using table() from base R would have no difference, but just to be sure, I created the thread. Are there any differences? Can I refer somehow to the fast_table function?
Hello,
I was trying to recreate the calculation of zpcum# metrics, found the current code
and noticed the command fast_table. I think using table() from base R would have no difference, but just to be sure, I created the thread. Are there any differences? Can I refer somehow to the fast_table function?
Thank you in advance!
Edit: typo