Displaying 1 result from an estimated 1 matches for "colsgtquantile".
2012 Jul 10
1
Why 95% "quantile" empty in R or why 95% "quantile" = 1 with data values between 0 and 1?
...nd 1, where obviously there's no column value equal to 1.
But why would 95% of a data be = 1 when there's clearly no value=1?
Thanks.
makeQuantiles <- function(x) {
t(apply(x, 1, function(row) { quantile(row, probs = c(0.50,0.75, 0.90,
0.91,0.92,0.93,0.94,0.95,0.96,0.97,0.98)
) }))
}
colsGTQuantile <- function(x, qs, q) {
sapply(rownames(x), function(rn) {
cat(sprintf("*** row name = %s, q = %s, val = %f\n", rn, q, qs[rn, q]))
names(x[rn, x[rn,] > qs[rn, q]])
}, simplify = TRUE)
}
df4 <- colsGTQuantile(km$points, qs, "95%")
--
View this message in...