R version 2.13.0 (2011-04-13) Copyright (C) 2011 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(99.1,99.7,100.1,100.2,100.1,100.4,99.8,99.7,99.4,100.2,100.5,100.6,100.9,101.9,102.1,102.6,103.5,103.9,103.7,103,103.1,103.2,103.2,103.1,103.7,104.2,104.4,104.9,105.4,105.9,105.5,106.1,105.4,105.7,106.2,106.7,106.8,106.8,106.8,107.3,107.3,107.5,107.4,106.9,108.1,108.6,108.2,108.3,108.3,109.3,109.2,109.4,109.7,109.6,109.3,108.4,108.7,109.4,109,110.3,109.5,109.7,109.5,110.9,110.9,110.4,111.1,110.8,111.3,111.7,112.2,111.7,111.3,111.9,111.7,111.8,111.5,112.9,112,112.4,111.1,111.7,111.4,112.2,112.5,113.2,114.7,115.2,114.1,113.7,115.5,115,115.4,115,114.6,114.6,114.5,115.2,116.3,116.5,118.4,118.5,118.7,119.2,119.5,118.5,118.6,118.2,118.6,120.6,124.5,124.6,126.5,126,126.3,126.3,125.1,126.7,123.9,123.6,124.9,126.2,126.3,126.4,126.2,125.8,124.9,126.2,125.9,124.6,122.9,119.9) > #'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/wessaorg/rcomp/tmp/12wks1318960538.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/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/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/wessaorg/rcomp/tmp/2dwrz1318960538.tab") > > try(system("convert tmp/12wks1318960538.ps tmp/12wks1318960538.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.965 0.090 1.064