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(106.42,106.22,106.32,105.81,105.92,107.54,107.34,107.24,107.74,105.71,105.41,106.22,106.32,106.12,106.22,105.92,105.71,105.71,105.92,105.71,105.41,104.49,101.35,99.72,99.01,97.89,95.86,94.95,95.35,95.15,95.46,95.56,95.05,94.64,93.63,93.12,93.53,97.18,96.27,95.15,97.08,101.95,103.07,103.68,102.87,102.56,103.38,103.27,102.89,102.69,101.54,102.9,101.53,101.96,101.99,101.11,101.75,101.71,104.11,103.57,103.32,103.64,103.68,103.79,103.01,101.54,101.9,103.68,104.62,104.11,105.04,104.83,105.05,104.68,107.32,109.9,109.77,110.69,110.54,110.89,110.95,109.73,110.85,110.39,110.58,110.4,111.07,110.86,111.38,111.44,110.36,110.06,108.34,107.94,107.39,107.1,107.61,107.74,106.9,106.71,106.6,108.21,110.54,110.91,109.51,110.27,111.39,112.13,111.64) > #'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/155qg1301845418.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/2micf1301845418.tab") > > try(system("convert tmp/155qg1301845418.ps tmp/155qg1301845418.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.940 0.040 1.013