R version 2.6.2 (2008-02-08) Copyright (C) 2008 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(516.922,514.258,509.846,527.070,541.657,564.591,555.362,498.662,511.038,525.919,531.673,548.854,560.576,557.274,565.742,587.625,619.916,625.809,619.567,572.942,572.775,574.205,579.799,590.072,593.408,597.141,595.404,612.117,628.232,628.884,620.735,569.028,567.456,573.100,584.428,589.379,590.865,595.454,594.167,611.324,612.613,610.763,593.530,542.722,536.662,543.599,555.332,560.854,562.325,554.788,547.344,565.464,577.992,579.714,569.323,506.971,500.857,509.127,509.933,517.009,519.164,512.238,509.239,518.585,522.975,525.192,516.847,455.626,454.724,461.251,470.439,474.605,476.049,471.067,470.984,502.831,512.927,509.673,484.015,431.328,436.087,442.867,447.988,460.070,467.037,460.170,464.196,485.025,501.492,520.564,488.180,439.148,441.977,456.608,461.935,480.961,492.865) > #'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) Attaching package: 'Hmisc' 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/108rz1208717208.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/2gwh51208717209.tab") > > system("convert tmp/108rz1208717208.ps tmp/108rz1208717208.png") > > > proc.time() user system elapsed 1.069 0.247 1.139