R version 2.9.0 (2009-04-17) Copyright (C) 2009 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(294.371 + ,155.359 + ,167.804 + ,82.893 + ,103.131 + ,130.093 + ,166.796 + ,72.174 + ,96.396 + ,81.056 + ,138.981 + ,197.604 + ,264.405 + ,119.403 + ,189.62 + ,155.779 + ,134.168 + ,126.862 + ,159.104 + ,163.426 + ,113.344 + ,175.645 + ,147.312 + ,164.642 + ,125.814 + ,138.558 + ,163.136 + ,148.763 + ,178.322 + ,107.805 + ,180.363 + ,179.006 + ,111.603 + ,251.469 + ,123.646 + ,108.398 + ,134.505 + ,129.605 + ,211.562 + ,300.239 + ,329.183 + ,115.475 + ,115.108 + ,101.922 + ,391.433 + ,103.906 + ,112.704 + ,619.22 + ,110.688 + ,95.539 + ,150.985 + ,138.107 + ,177.705 + ,757.365 + ,103.671 + ,81.101 + ,130.586 + ,166.608 + ,201.734 + ,175.329 + ,126.372 + ,107.822 + ,146.123 + ,98.815 + ,219.641 + ,156 + ,123.928 + ,156.405 + ,104.828 + ,188.594 + ,575.698 + ,564.424 + ,149.465 + ,168.474 + ,280.909 + ,172.095 + ,73.594 + ,128.317 + ,202.431 + ,149.787 + ,243.719 + ,188.553 + ,125.634 + ,166.548 + ,284.966 + ,122.213 + ,172.936 + ,152.882 + ,242.736 + ,107.814 + ,155.723 + ,192.582 + ,126.668 + ,127.17 + ,125.77 + ,144.493 + ,123.241 + ,138.431 + ,150.875 + ,375.445 + ,154.611 + ,83.401 + ,115.175 + ,198.463 + ,520.108 + ,235.576 + ,105.44 + ,152.272 + ,310.469 + ,217.089 + ,229.36 + ,555.232 + ,466.984 + ,127.703 + ,101.383 + ,172.705 + ,79.114 + ,213.859 + ,256.736 + ,161.995 + ,112.314 + ,219.779 + ,188.723 + ,141.648 + ,146.564 + ,113.163 + ,85.657 + ,127.958 + ,114.909 + ,198.214 + ,133.215 + ,131.576 + ,287.667 + ,140.275 + ,137.435 + ,190.055 + ,104.39 + ,178.032 + ,79.356 + ,250.571 + ,123.115 + ,247.026 + ,190.38 + ,219.114 + ,131.753 + ,135.922 + ,855.826 + ,145.195 + ,82.337 + ,141.758 + ,78.649 + ,117.482 + ,90.986 + ,101.864 + ,120.33 + ,137.019) > #'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/html/rcomp/tmp/1idk91289579226.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/2gauq1289579226.tab") > > try(system("convert tmp/1idk91289579226.ps tmp/1idk91289579226.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.765 0.247 0.916