R version 2.12.1 (2010-12-16) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: x86_64-redhat-linux-gnu (64-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(131676 + ,135050 + ,129070 + ,137792 + ,139762 + ,142917 + ,144198 + ,142648 + ,152170 + ,136022 + ,138142 + ,138135 + ,135027 + ,132911 + ,133976 + ,137012 + ,119610 + ,118106 + ,120383 + ,133185 + ,131416 + ,134248 + ,134397 + ,127728 + ,131837 + ,125955 + ,134187 + ,143291 + ,145074 + ,149812 + ,144668 + ,147253 + ,145568 + ,155564 + ,155872 + ,156323 + ,158010 + ,155598 + ,154785 + ,157294 + ,162938 + ,157283 + ,166074 + ,169282 + ,172552 + ,174055 + ,175409 + ,173696 + ,171283 + ,173322 + ,170717 + ,174229 + ,175339 + ,173511 + ,175839 + ,173816 + ,173990 + ,174777 + ,174819 + ,176726 + ,176199 + ,180952 + ,176663 + ,182346 + ,180605 + ,182497 + ,187856 + ,190020 + ,190108 + ,193288 + ,193230 + ,199068 + ,195076 + ,191563 + ,191067 + ,186665 + ,185508 + ,184371 + ,183046 + ,175714 + ,175768 + ,171029 + ,170465 + ,170102 + ,156389 + ,124291 + ,99360 + ,86675 + ,85056 + ,128236 + ,164257 + ,162401 + ,152779 + ,156005 + ,153387 + ,153190 + ,148840 + ,144211 + ,145953 + ,145542 + ,150271 + ,147489 + ,143824 + ,134754 + ,131736 + ,126304 + ,125511 + ,125495 + ,130133 + ,126257 + ,110323 + ,98417 + ,105749 + ,120665 + ,124075 + ,127245 + ,146731 + ,144979 + ,148210 + ,144670 + ,142970 + ,142524 + ,146142 + ,146522 + ,148128 + ,148798 + ,150181 + ,152388 + ,155694 + ,160662 + ,155520 + ,158262 + ,154338 + ,158196 + ,160371 + ,154856 + ,150636 + ,145899 + ,141242 + ,140834 + ,141119 + ,139104 + ,134437 + ,129425 + ,123155 + ,119273 + ,120472 + ,121523 + ,121983 + ,123658 + ,124794 + ,124827 + ,120382 + ,117395 + ,115790 + ,114283 + ,117271 + ,117448 + ,118764 + ,120550 + ,123554 + ,125412 + ,124182 + ,119828 + ,115361 + ,114226 + ,115214 + ,115864 + ,114276 + ,113469 + ,114883 + ,114172 + ,111225 + ,112149 + ,115618 + ,118002 + ,121382 + ,120663) > par1 = '0' > ylab = 'jaartal' > xlab = 'aantal geboortes' > #'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/wessaorg/rcomp/tmp/16ky21300268601.ps",horizontal=F,onefile=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 (178 obs.); Bandwidth 'bw' = 7733 x y Min. : 61858 Min. :4.722e-09 1st Qu.:101960 1st Qu.:7.153e-07 Median :142062 Median :5.442e-06 Mean :142062 Mean :6.228e-06 3rd Qu.:182164 3rd Qu.:1.170e-05 Max. :222266 Max. :1.445e-05 > postscript(file="/var/www/wessaorg/rcomp/tmp/2rvig1300268601.ps",horizontal=F,onefile=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/wessaorg/rcomp/tmp/3j0jm1300268601.ps",horizontal=F,onefile=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/wessaorg/rcomp/tmp/45wi51300268601.ps",horizontal=F,onefile=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/wessaorg/rcomp/tmp/5htu21300268601.ps",horizontal=F,onefile=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/wessaorg/rcomp/tmp/6xdk71300268601.ps",horizontal=F,onefile=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/wessaorg/rcomp/tmp/7xapp1300268601.ps",horizontal=F,onefile=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/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/wessaorg/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/wessaorg/rcomp/tmp/81ddy1300268601.tab") > > try(system("convert tmp/16ky21300268601.ps tmp/16ky21300268601.png",intern=TRUE)) character(0) > try(system("convert tmp/2rvig1300268601.ps tmp/2rvig1300268601.png",intern=TRUE)) character(0) > try(system("convert tmp/3j0jm1300268601.ps tmp/3j0jm1300268601.png",intern=TRUE)) character(0) > try(system("convert tmp/45wi51300268601.ps tmp/45wi51300268601.png",intern=TRUE)) character(0) > try(system("convert tmp/5htu21300268601.ps tmp/5htu21300268601.png",intern=TRUE)) character(0) > try(system("convert tmp/6xdk71300268601.ps tmp/6xdk71300268601.png",intern=TRUE)) character(0) > try(system("convert tmp/7xapp1300268601.ps tmp/7xapp1300268601.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.740 0.320 2.165