R version 2.12.0 (2010-10-15) 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(251.97013888889 + ,572.861805555554 + ,-37.4798611111109 + ,51.2284722222212 + ,23.2534722222226 + ,-382.704861111111 + ,97.478472222223 + ,168.111805555556 + ,-207.379861111111 + ,9.66180555555547 + ,68.6118055555562 + ,90.6784722222237 + ,-151.90486111111 + ,91.5701388888901 + ,-398.563194444443 + ,191.811805555557 + ,-38.0798611111095 + ,-62.8715277777774 + ,185.936805555557 + ,-77.013194444442 + ,-43.6715277777766 + ,115.245138888889 + ,-75.888194444442 + ,-358.113194444444 + ,354.845138888888 + ,-103.429861111112 + ,-15.8548611111109 + ,336.145138888889 + ,-338.454861111111 + ,103.003472222223 + ,-167.104861111109 + ,-126.67986111111 + ,138.703472222223 + ,80.4534722222234 + ,208.653472222222 + ,-89.2381944444423 + ,-138.696527777776 + ,-422.80486111111 + ,207.395138888887 + ,193.478472222223 + ,70.7118055555566 + ,66.2951388888905 + ,-217.938194444443 + ,88.4034722222241 + ,177.411805555555 + ,-224.796527777777 + ,-47.138194444442 + ,157.178472222224 + ,80.095138888888 + ,6.82013888889014 + ,92.0618055555569 + ,-339.104861111111 + ,166.711805555557 + ,55.1701388888887 + ,51.3118055555569 + ,-103.138194444444 + ,-115.379861111112 + ,-30.8798611111106 + ,-204.55486111111 + ,149.178472222224 + ,-194.65486111111 + ,377.528472222222 + ,64.6451388888909) > #'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/17khq1324476903.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/2u1qe1324476903.tab") > > try(system("convert tmp/17khq1324476903.ps tmp/17khq1324476903.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.130 0.110 1.235