R version 3.3.1 (2016-06-21) -- "Bug in Your Hair" Copyright (C) 2016 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-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(29312,29336,29357,29380,29402,29426,29448,29471,29495,29517,29540,29563,29586,29609,29631,29654,29677,29700,29723,29746,29769,29792,29815,29837,29861,29884,29905,29928,29951,29974,29996,30020,30043,30065,30089,30111,30134,30158,30179,30202,30224,30248,30270,30293,30317,30339,30362,30385,30408,30431,30452,30476,30498,30521,30544,30567,30590,30613,30636,30659,30682,30705,30727,30750,30773,30796,30818,30842,30865,30887,30911,30933,30956,30980,31001,31024,31046,31070,31092,31115,31139,31161,31184,31207,31230,31253,31274,31298,31320,31343,31366,31389,31412,31435,31458,31481,31504,31527,31548,31571,31594,31617,31640,31663,31686,31709,31732,31754) > par3 = '0.01' > par2 = '0.99' > par1 = '0.01' > ylab = 'Aantal bezoekers' > xlab = 'Percentiles' > main = 'Percentiles Electricity Museum' > par3 <- '0.01' > par2 <- '0.99' > par1 <- '0.01' > #'GNU S' R Code compiled by R2WASP v. 1.2.291 () > #Author: root > #To cite this work: Wessa, (2012), Harrell-Davis Quantile Estimator (v1.0.13) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_harrell_davis.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > # > par1 <- as(par1,'numeric') > par2 <- as(par2,'numeric') > par3 <- as(par3,'numeric') > library(Hmisc) Loading required package: grid Loading required package: lattice Loading required package: survival Loading required package: Formula Loading required package: ggplot2 Attaching package: 'Hmisc' The following objects 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/115v61471082169.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] 99 > 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/2o5xb1471082169.tab") > > try(system("convert tmp/115v61471082169.ps tmp/115v61471082169.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.592 0.142 1.738