[R] use of class variable in r as in Proc means of sas
Girish A.R.
garamach at gmail.com
Wed Sep 23 13:47:49 CEST 2009
See if this works:
qfun2 <- function(x, digits=3,sci=F,...){
c(q=quantile(x, probs=c(1,5,10,95,99)/100,type=6,...)
)
}
cheers,
-Girish
===========================
premmad wrote:
>
> I tried thanks for your help and got the same result for percentile 5 & 95
> as in SAS.But if i need to calculate quantiles (1,5,10,99,etc.) it will
> not be possible with fivenum as explained in the help page .If i need
> those quantiles what is the change i need to make in the function
> qfu<-function(x,digits=3,sci=F,...)
> {c(q=quantile(x,probs=c(5,90)/100))
> }
>
> or do i need to include some other function .
>
>
--
View this message in context: http://www.nabble.com/use-of-class-variable-in-r-as-in-Proc-means-of-sas-tp25530654p25531097.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list