R version 2.13.0 (2011-04-13) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- c(0.0266,0.0324,0.0305,0.0298,0.0201,0.0174,0.0118,0.0140,0.0128,0.0134,0.0111,0.0094,0.0121,0.0092,0.0134,0.0135,0.0147,0.0111,0.0160,0.0147,0.0164,0.0167,0.0156,0.0172,0.0160,0.0156,0.0131,0.0110,0.0158,0.0188,0.0161,0.0173,0.0163,0.0143,0.0209,0.0189,0.0172,0.0178,0.0200,0.0252,0.0209,0.0213,0.0232,0.0242,0.0241,0.0225,0.0172,0.0204,0.0233,0.0201,0.0196,0.0133,0.0173,0.0187,0.0168,0.0158,0.0169,0.0178,0.0191,0.0185,0.0186,0.0204,0.0208,0.0194,0.0191,0.0134,0.0130,0.0138,0.0124,0.0130,0.0179,0.0224,0.0264,0.0279,0.0308,0.0388,0.0370,0.0461,0.0507,0.0522,0.0493,0.0515,0.0480,0.0390,0.0354,0.0334,0.0280,0.0160,0.0153,0.0069,-0.0010,-0.0066,-0.0020,-0.0062,-0.0058,-0.0031,-0.0025,-0.0009,0.0013,0.0094,0.0105,0.0158,0.0202,0.0216,0.0206,0.0256,0.0254,0.0253,0.0260,0.0272,0.0281,0.0292,0.0287,0.0289,0.0327,0.0333,0.0314,0.0303,0.0309,0.0339) > par3 = '0.05' > par2 = '0.99' > par1 = '0.01' > ylab = 'value' > xlab = 'quantile' > main = 'Harrell-Davis Quantiles' > par1 <- as(par1,'numeric') > par2 <- as(par2,'numeric') > par3 <- as(par3,'numeric') > library(Hmisc) Loading required package: survival Loading required package: splines Attaching package: 'Hmisc' The following object(s) are masked from 'package:survival': untangle.specials The following object(s) are masked from 'package:base': format.pval, round.POSIXt, trunc.POSIXt, units > myseq <- seq(par1, par2, par3) > hd <- hdquantile(x, probs = myseq, se = TRUE, na.rm = FALSE, names = TRUE, weights=FALSE) > postscript(file="/var/wessaorg/rcomp/tmp/1r6721323886425.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(myseq,hd,col=2,main=main,xlab=xlab,ylab=ylab) > grid() > dev.off() null device 1 > > #Note: the /var/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Harrell-Davis Quantiles',3,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'quantiles',header=TRUE) > a<-table.element(a,'value',header=TRUE) > a<-table.element(a,'standard error',header=TRUE) > a<-table.row.end(a) > length(hd) [1] 20 > for (i in 1:length(hd)) + { + a<-table.row.start(a) + a<-table.element(a,as(labels(hd)[i],'numeric'),header=TRUE) + a<-table.element(a,as.matrix(hd[i])[1,1]) + a<-table.element(a,as.matrix(attr(hd,'se')[i])[1,1]) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/2sejx1323886425.tab") > > try(system("convert tmp/1r6721323886425.ps tmp/1r6721323886425.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.765 0.090 0.850