R version 2.12.1 (2010-12-16) 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(0.0218,0.0290,0.0263,0.0267,0.0181,0.0133,0.0088,0.0128,0.0126,0.0126,0.0129,0.0110,0.0137,0.0121,0.0174,0.0176,0.0148,0.0104,0.0162,0.0149,0.0179,0.0180,0.0158,0.0186,0.0174,0.0159,0.0126,0.0113,0.0192,0.0261,0.0226,0.0241,0.0226,0.0203,0.0286,0.0255,0.0227,0.0226,0.0257,0.0307,0.0276,0.0251,0.0287,0.0314,0.0311,0.0316,0.0247,0.0257,0.0289,0.0263,0.0238,0.0169,0.0196,0.0219,0.0187,0.0160,0.0163,0.0122,0.0121,0.0149,0.0164,0.0166,0.0177,0.0182,0.0178,0.0128,0.0129,0.0137,0.0112,0.0151,0.0224,0.0294,0.0309,0.0346,0.0364,0.0439,0.0415,0.0521,0.0580,0.0591,0.0539,0.0546,0.0472,0.0314,0.0263,0.0232,0.0193,0.0062,0.0060,-0.0037,-0.0110,-0.0168,-0.0078,-0.0119,-0.0097,-0.0012,0.0026,0.0062,0.0070,0.0166,0.0180,0.0227,0.0246,0.0257,0.0232,0.0291,0.0301,0.0286,0.0310,0.0322,0.0339,0.0352,0.0341,0.0335,0.0367,0.0375,0.0360,0.0355,0.0357,0.0385) > #'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/1ko5s1323890791.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/2f2d61323890791.tab") > > try(system("convert tmp/1ko5s1323890791.ps tmp/1ko5s1323890791.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.988 0.108 1.113