Dear, I want to make an application to calculate quantile within a For()

I tried the following without success:

ej.

date 

p_val <- matrix(sample(10, 1000, replace=TRUE), 200,5)

test 1
rr <- paste("p_val$",names(p_val[1]), sep="")  
quant <- quantile(rr, probs = c(0, 10, 20, 30, 40, 50, 60, 70, 80, 90,
100)/100, na.rm=FALSE, type=1)

test 2
rr <- noquote(paste("p_val$",names(p_val[1]), sep=""))  
quant <- quantile(rr, probs = c(0, 10, 20, 30, 40, 50, 60, 70, 80, 90,
100)/100, na.rm=FALSE, type=1)

test 3
quant <- quantile(p_val[1], probs = c(0, 10, 20, 30, 40, 50, 60, 70, 80,
90, 100)/100, na.rm=FALSE, type=1)


The only thing that works for me is:

quant <- quantile(p_val$1, probs = c(0, 10, 20, 30, 40, 50, 60, 70, 80,
90, 100)/100, na.rm=FALSE, type=1)

but the evil, he will not let me do this for a dynamic For()


I hope I can help, as they always do.

from now, thank you very much.

Atte.

Agustín


	[[alternative HTML version deleted]]

