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(22577.0,22792.0,23932.0,22321.0,21102.0,22824.0,23129.0,23604.0,24746.0,26911.0,27909.0,28922.0,29800.0,30506.0,30771.0,31976.0,33749.0,34371.0,33246.0,35072.0,35762.0,36179.0,37433.0,38298.0,37559.0,37511.0,39364.0,40084.0,42712.0,41938.0,40799.0,38568.0,41134.0,43955.0,43607.0,45082.0,46464.0,46496.0,46774.0,47890.0,45740.0,42660.0,39190.0,39010.0,41150.0,42530.0,44710.0,46620.0,44560.0,46120.0,48060.0,51970.0,57720.0,63490.0,65370.0,64260.0,58700.0,58630.0,59803.0,59266.0,60570.0,63062.0,63846.0,64726.0,63460.0,65220.0,66659.0,66871.0,65672.0,67182.0,68292.0,68318.0,69530.0,70500.0,72044.0,73811.0,76018.0,77818.0,79455.0,81408.0,81815.0) > par1 = '0' > ylab = 'Density' > xlab = 'Waarde' > #'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: > if (par1 == '0') bw <- 'nrd0' > if (par1 != '0') bw <- as.numeric(par1) > postscript(file="/var/www/html/rcomp/tmp/10sky1266419357.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > mydensity1<-density(x,bw=bw,kernel='gaussian',na.rm=TRUE) > plot(mydensity1,main='Gaussian Kernel',xlab=xlab,ylab=ylab) > grid() > dev.off() null device 1 > mydensity1 Call: density.default(x = x, bw = bw, kernel = "gaussian", na.rm = TRUE) Data: x (81 obs.); Bandwidth 'bw' = 6262 x y Min. : 2316 Min. :2.032e-08 1st Qu.: 26887 1st Qu.:2.216e-06 Median : 51458 Median :1.165e-05 Mean : 51458 Mean :1.016e-05 3rd Qu.: 76030 3rd Qu.:1.575e-05 Max. :100601 Max. :2.381e-05 > postscript(file="/var/www/html/rcomp/tmp/2q5f51266419357.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > mydensity2<-density(x,bw=bw,kernel='epanechnikov',na.rm=TRUE) > plot(mydensity2,main='Epanechnikov Kernel',xlab=xlab,ylab=ylab) > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/3on3r1266419357.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > mydensity3<-density(x,bw=bw,kernel='rectangular',na.rm=TRUE) > plot(mydensity3,main='Rectangular Kernel',xlab=xlab,ylab=ylab) > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/4zh5z1266419357.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > mydensity4<-density(x,bw=bw,kernel='triangular',na.rm=TRUE) > plot(mydensity4,main='Triangular Kernel',xlab=xlab,ylab=ylab) > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5bte91266419357.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > mydensity5<-density(x,bw=bw,kernel='biweight',na.rm=TRUE) > plot(mydensity5,main='Biweight Kernel',xlab=xlab,ylab=ylab) > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6xu9h1266419357.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > mydensity6<-density(x,bw=bw,kernel='cosine',na.rm=TRUE) > plot(mydensity6,main='Cosine Kernel',xlab=xlab,ylab=ylab) > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7wz1q1266419357.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > mydensity7<-density(x,bw=bw,kernel='optcosine',na.rm=TRUE) > plot(mydensity7,main='Optcosine Kernel',xlab=xlab,ylab=ylab) > grid() > 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,'Properties of Density Trace',2,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Bandwidth',header=TRUE) > a<-table.element(a,mydensity1$bw) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'#Observations',header=TRUE) > a<-table.element(a,mydensity1$n) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/81oc61266419357.tab") > > try(system("convert tmp/10sky1266419357.ps tmp/10sky1266419357.png",intern=TRUE)) character(0) > try(system("convert tmp/2q5f51266419357.ps tmp/2q5f51266419357.png",intern=TRUE)) character(0) > try(system("convert tmp/3on3r1266419357.ps tmp/3on3r1266419357.png",intern=TRUE)) character(0) > try(system("convert tmp/4zh5z1266419357.ps tmp/4zh5z1266419357.png",intern=TRUE)) character(0) > try(system("convert tmp/5bte91266419357.ps tmp/5bte91266419357.png",intern=TRUE)) character(0) > try(system("convert tmp/6xu9h1266419357.ps tmp/6xu9h1266419357.png",intern=TRUE)) character(0) > try(system("convert tmp/7wz1q1266419357.ps tmp/7wz1q1266419357.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.302 1.079 1.931