Re: [R] NTH PERCENTILE COULMNWIESE

2012-07-18 Thread arun
r-project.org Cc: Sent: Wednesday, July 18, 2012 3:06 AM Subject: [R] NTH PERCENTILE COULMNWIESE Hi, Here i have an matrix mydat <- ABC    XYZ -    -- 12          6 6            50 90        100 55          85 100        25 i need to find the " NTH percentile "  [result shou

Re: [R] NTH PERCENTILE COULMNWIESE

2012-07-18 Thread Rui Barradas
Hello, Try the following. colQuant <- function(x, probs= seq(0, 1, 0.25), na.rm = FALSE, names = TRUE, type = 7, ...){ apply(x, 2, quantile, probs = probs, na.rm = na.rm, names = names, type = type, ...) } mat <- matrix(rnorm(12), 4) colQuant(mat, 0.20) colQuant(mat, c(0.20, 0.5))

[R] NTH PERCENTILE COULMNWIESE

2012-07-18 Thread Rantony
Hi, Here i have an matrix mydat <- ABCXYZ - -- 12 6 6 50 90 100 55 85 100 25 i need to find the " NTH percentile " [result should be in column-wise]. here i have a code for NTH percenile, For eg:- if i need 20th-percentile then, qu