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(4000 + ,3600 + ,1600 + ,2500 + ,3800 + ,3500 + ,4100 + ,2000 + ,3300 + ,4000 + ,4100 + ,4200 + ,1100 + ,1900 + ,4800 + ,4000 + ,3250 + ,1200 + ,3600 + ,3400 + ,3600 + ,3300 + ,1300 + ,2500 + ,3800 + ,3800 + ,3000 + ,1600 + ,2100 + ,3900 + ,4000 + ,3900 + ,2300 + ,3600 + ,3600 + ,4200 + ,4400 + ,1900 + ,2700 + ,3600 + ,4100 + ,5250 + ,1200 + ,3000 + ,4000 + ,5200 + ,2100 + ,3400 + ,5200 + ,6900 + ,2300 + ,4100 + ,4300 + ,4500 + ,4700 + ,2200 + ,2900 + ,4400 + ,5100 + ,2300 + ,3500 + ,4100 + ,4700 + ,5400 + ,2500 + ,3500 + ,3900 + ,4100 + ,4500 + ,1800 + ,4900 + ,4500 + ,3700 + ,3100 + ,1700 + ,4000 + ,4200 + ,4300 + ,3600 + ,2600 + ,4600 + ,4000 + ,2900 + ,1800 + ,3000 + ,4200 + ,4400 + ,4900 + ,2300 + ,2400 + ,3600 + ,3900 + ,2800 + ,3800 + ,4400 + ,4200 + ,5400 + ,2300 + ,3500 + ,3800 + ,4400 + ,4400 + ,2500 + ,3700 + ,3500 + ,3300 + ,3700 + ,2200 + ,3200 + ,3100 + ,4800 + ,4400 + ,2500 + ,3100 + ,4700 + ,4300 + ,4600 + ,3100 + ,3200 + ,4300 + ,4000 + ,4500 + ,2600 + ,3600 + ,4700 + ,3800 + ,4100 + ,1700 + ,3200 + ,4000 + ,3700 + ,3600 + ,2500 + ,3800 + ,4500 + ,3500 + ,4100 + ,2300 + ,3400 + ,4800 + ,4900 + ,2600 + ,3300 + ,3900 + ,3800 + ,5000 + ,1700 + ,2700 + ,4000 + ,3300 + ,4000 + ,2500 + ,3600 + ,3800 + ,5900 + ,3600 + ,3300 + ,4000 + ,4200 + ,4300 + ,2900 + ,3900 + ,5200 + ,4000 + ,4700 + ,2200 + ,2400 + ,3700 + ,3700 + ,3000 + ,2100 + ,3500 + ,6300 + ,5200 + ,7800 + ,2700 + ,3400 + ,5000 + ,5500 + ,4500 + ,2600 + ,3900 + ,3800 + ,4400 + ,4300 + ,3300 + ,3600 + ,5300 + ,3700 + ,3800 + ,4000 + ,5200 + ,5100 + ,5100 + ,5200 + ,3800 + ,6700 + ,5200 + ,4900 + ,5700 + ,2700 + ,6300 + ,5200 + ,4500 + ,6400 + ,4000 + ,3500 + ,4700 + ,4700 + ,5000 + ,2300 + ,5200 + ,5100 + ,5400 + ,4400 + ,2600 + ,4700 + ,6100 + ,6100 + ,3500 + ,4900 + ,5500 + ,5300 + ,6300 + ,2800 + ,5900 + ,5500 + ,5200 + ,6400 + ,3100 + ,5100 + ,5400 + ,5400 + ,5100 + ,2400 + ,5500 + ,5300 + ,5000 + ,4500 + ,2000 + ,3800 + ,4900 + ,5000 + ,4000 + ,1900 + ,5200 + ,5400 + ,3200 + ,800 + ,3800 + ,4300 + ,2700) > par1 = '0' > ylab = '????' > xlab = 'hoeveelheid in lijnen' > #'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/181to1236202745.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 (252 obs.); Bandwidth 'bw' = 353.8 x y Min. :-261.5 Min. :5.046e-08 1st Qu.:2019.3 1st Qu.:5.422e-06 Median :4300.0 Median :5.447e-05 Mean :4300.0 Mean :1.095e-04 3rd Qu.:6580.7 3rd Qu.:1.941e-04 Max. :8861.5 Max. :3.640e-04 > postscript(file="/var/www/html/rcomp/tmp/2zvcm1236202745.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/3m8nz1236202745.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/4i7we1236202745.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/555f01236202745.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/6sgjp1236202745.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/7ueg21236202745.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/8llxl1236202745.tab") > > system("convert tmp/181to1236202745.ps tmp/181to1236202745.png") > system("convert tmp/2zvcm1236202745.ps tmp/2zvcm1236202745.png") > system("convert tmp/3m8nz1236202745.ps tmp/3m8nz1236202745.png") > system("convert tmp/4i7we1236202745.ps tmp/4i7we1236202745.png") > system("convert tmp/555f01236202745.ps tmp/555f01236202745.png") > system("convert tmp/6sgjp1236202745.ps tmp/6sgjp1236202745.png") > system("convert tmp/7ueg21236202745.ps tmp/7ueg21236202745.png") > > > proc.time() user system elapsed 1.397 1.166 2.694