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. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.