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(1020,970,1030,970,1070,1650,1010,980,1050,1010,1040,1120,1090,1060,990,950,1540,870,1070,1050,1020,960,1100,1190,1040,1090,1050,850,1100,850,1040,990,1040,1100,1030,1290,1040,1170,1040,860,1090,870,1080,1000,980,1080,1040,1280,1140,1220,1080,790,1020,830,1150,1030,900,1140,1010,1270,1090,1090,980,850,1010,810,1070,1040,880,1110,1010,1230,490,1040,1010,860,1010,800,1130,1040,940,1070,1030,1320,1040,1070,1070,770,1010,810,1150,1030,890,1010,1120,1250,990,1020,1110,830,1030,870,1260,980,940,970,1100,1320) > #'GNU S' R Code compiled by R2WASP v. 1.2.291 () > #Author: root > #To cite this work: Wessa P., (2012), Mean versus Median (v1.0.2) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_meanversusmedian.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > # > 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/1esc11343999286.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=6.9444444444444,height=2.7777777777778) > 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') Error in plot.new() : figure margins too large Calls: plot -> plot.density -> plot.default -> plot.new Execution halted