R version 2.8.0 (2008-10-20) 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(493395.00,487190.00,519493.00,519453.00,538588.00,438224.00,542034.00,512027.00,619880.00,533737.00,573789.00,589213.00,532168.00,551102.00,593789.00,527106.00,547327.00,601305.00,610872.00,601325.00,642143.00,614216.00,657979.00,673098.00,602297.00,615381.00,703671.00,733852.00,716596.00,745798.00,742027.10,679181.20,739022.70,645410.60,729382.10,671052.70,744954.80,677639.30,778207.20,763316.20,658531.60,831700.10,664156.30,621402.10,683588.70,600023.80,643273.80,653615.90,620177.50,574128.80,599828.00,599369.40,596617.70,616114.60,510226.90,493960.10,634503.30,588556.20,603239.00,617458.20,646543.50,680125.60,731595.80,759600.30,785031.70,849573.30,762342.00,815346.60,929603.20,784057.50,944667.70,1007258.30,664292.70,873207.40,1146510.00,1417266.80,1089387.90,1373379.70,1009397.60,818175.10,1003458.10,961142.70,1121906.60,1141713.30,1042352.60,992223.60,920525.30,1076093.40,967880.40,1236416.10) > #'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/freestat/rcomp/tmp/1fgi11240336529.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/freestat/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/freestat/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/freestat/rcomp/tmp/2pia21240336529.tab") > > system("convert tmp/1fgi11240336529.ps tmp/1fgi11240336529.png") > > > proc.time() user system elapsed 1.152 0.340 1.323