R version 2.12.2 (2011-02-25) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: x86_64-redhat-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(16870 + ,15080 + ,15070 + ,13850 + ,16320 + ,15110 + ,15590 + ,16300 + ,15790 + ,16530 + ,21520 + ,21480 + ,17520 + ,17650 + ,17170 + ,15580 + ,15750 + ,15200 + ,18050 + ,18000 + ,17190 + ,20080 + ,22420 + ,24780 + ,20300 + ,16550 + ,16930 + ,16230 + ,18050 + ,17460 + ,17950 + ,19260 + ,16190 + ,19920 + ,22330 + ,21920 + ,20800 + ,17680 + ,18350 + ,15690 + ,19760 + ,18530 + ,19650 + ,16890 + ,17780 + ,19760 + ,23970 + ,26540 + ,20970 + ,19630 + ,16770 + ,19410 + ,20030 + ,18130 + ,20120 + ,19120 + ,20840 + ,20800 + ,21180 + ,21500 + ,16080 + ,15030 + ,15480 + ,13820 + ,17310 + ,17980 + ,17790 + ,18870 + ,20040 + ,20770 + ,20920 + ,20510 + ,15770 + ,13560 + ,16520 + ,13820 + ,15190 + ,14210 + ,14420 + ,15430 + ,16560 + ,15610 + ,19050 + ,21990 + ,14730 + ,16550 + ,14070 + ,13950 + ,15300 + ,13090 + ,15260 + ,13270 + ,16270 + ,17480 + ,19580 + ,22740 + ,16480 + ,14010 + ,14110 + ,14030 + ,13940 + ,15200 + ,15280 + ,16430 + ,15150 + ,16850 + ,20000 + ,22150 + ,19560 + ,14620 + ,15630 + ,14590 + ,14460 + ,16220 + ,16570 + ,16380 + ,16430 + ,16830 + ,20500 + ,22620 + ,18130 + ,14450 + ,17620 + ,14610 + ,15560 + ,14310 + ,14270 + ,15540 + ,16450 + ,16530 + ,20160 + ,22070 + ,16650 + ,13610 + ,15060 + ,13600 + ,14530 + ,15220 + ,14600 + ,15520 + ,15480 + ,18270 + ,17370 + ,19410 + ,14740 + ,14580 + ,15420 + ,14040 + ,15220 + ,13850 + ,16410 + ,15100 + ,16810 + ,19380 + ,18680 + ,17260 + ,14560 + ,14450 + ,14560 + ,13650 + ,14870 + ,15580 + ,14880 + ,16840 + ,15940 + ,18500 + ,19980 + ,20790 + ,14940 + ,10571 + ,12181 + ,11681 + ,12361 + ,10761 + ,11741 + ,11391 + ,14271 + ,14871 + ,14831 + ,15131 + ,13571 + ,11651 + ,12821 + ,11101 + ,12971 + ,11851 + ,12221 + ,12841 + ,14441 + ,15751 + ,17371 + ,17631) > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > 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 > m <- mean(x) > e <- median(x) > postscript(file="/var/www/wessaorg/rcomp/tmp/1sgim1301836627.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=11.111111111111) > op <- par(mfrow=c(2,1)) > mydensity1 <- density(x,kernel='gaussian',na.rm=TRUE) > plot(mydensity1,main='Density Plot - Gaussian Kernel',xlab='Median (0 -> full line) | Mean (0 -> dashed line)',ylab='density') > abline(v=e,lty=1) > abline(v=m,lty=5) > grid() > myseq <- seq(0.01, 0.99, 0.01) > hd <- hdquantile(x, probs = myseq, se = TRUE, na.rm = FALSE, names = TRUE, weights=FALSE) > plot(myseq,hd,col=2,main='Harrell-Davis Quantiles',xlab='quantiles',ylab='Median (0 -> full) | Mean (0 -> dashed)') > abline(h=m,lty=5) > abline(h=e,lty=1) > grid() > par(op) > dev.off() null device 1 > > #Note: the /var/www/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/wessaorg/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Median versus Mean',2,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'mean',header=TRUE) > a<-table.element(a,mean(x)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'median',header=TRUE) > a<-table.element(a,median(x)) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/www/wessaorg/rcomp/tmp/28qea1301836627.tab") > > try(system("convert tmp/1sgim1301836627.ps tmp/1sgim1301836627.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.850 0.150 1.032