R version 2.12.1 (2010-12-16) Copyright (C) 2010 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(7992,6114,5965,8460,8323,6333,5675,10090,9035,6976,6459,10896,9978,7466,7199,10977,9412,6341,7784,11911,10079,7721,8197,12038,11963,8033,8618,13625,11734,8895,8727,13974,12583,9525,9662,15490,13839,10047,9788,14978,13045,9489,8741,13149,14106,9998,10034,15081,13266,9997,9027,14324,13149,11209,10332,15354,13800,11786,10550,16114,13255,11403,10269,14009,15847,12967,11328,15814,18626,13219,13818,18062,15722,12111,11702,15589,14852,13612,12380,15501,16322,12157,11124,14621,14035,11159,10944,15824,14378,11816,12233,17344,16812,12181,13275,18458,17375,14609,13323,18327,16053,15070,13806,18245,17461,14999,16022,20564,16372,15854,15115,18207,19488,16644,18631,21093,22212,19762,19403,21227,23176,20823,20647,21336,23458,22003,21647,26416,25226,24723,19945,24040,25034,24885,21168,23541,26019,24657,20599,24534,28717,26138,22968,26577,28660,30430,27356,25454,30194) > #'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/rcomp/tmp/1ffgc1301942301.ps",horizontal=F,onefile=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/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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/rcomp/tmp/2odqb1301942301.tab") > > try(system("convert tmp/1ffgc1301942301.ps tmp/1ffgc1301942301.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.708 0.180 1.856