R version 2.9.0 (2009-04-17) Copyright (C) 2009 The R Foundation for Statistical Computing ISBN 3-900051-07-0 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(22577.0,22792.0,23932.0,22321.0,21102.0,22824.0,23129.0,23604.0,24746.0,26911.0,27909.0,28922.0,29800.0,30506.0,30771.0,31976.0,33749.0,34371.0,33246.0,35072.0,35762.0,36179.0,37433.0,38298.0,37559.0,37511.0,39364.0,40084.0,42712.0,41938.0,40799.0,38568.0,41134.0,43955.0,43607.0,45082.0,46464.0,46496.0,46774.0,47890.0,45740.0,42660.0,39190.0,39010.0,41150.0,42530.0,44710.0,46620.0,44560.0,46120.0,48060.0,51970.0,57720.0,63490.0,65370.0,64260.0,58700.0,58630.0,59803.0,59266.0,60570.0,63062.0,63846.0,64726.0,63460.0,65220.0,66659.0,66871.0,65672.0,67182.0,68292.0,68318.0,69530.0,70500.0,72044.0,73811.0,76018.0,77818.0,79455.0,81408.0,81815.0) > #'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/html/rcomp/tmp/1mgdr1271874074.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > 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/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/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/html/rcomp/tmp/27gtf1271874074.tab") > > try(system("convert tmp/1mgdr1271874074.ps tmp/1mgdr1271874074.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.686 0.243 1.448