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(285708,905858,225733,405481,845758,805651,395747,695853,175625,405534,965639,575634,576023,566089,336141,26271,586226,376484,176583,287042,997142,207694,418003,838258,848182,658215,208304,398599,438399,578393,988390,958304,318251,78307,408520,748640,258520,518618,388588,238842,328957,499266,109011,168896,798921,878732,897576,518317,228370,758167,658491,518170,398212,498286,78136,647990,357927,698061,407932,637934,397784,217980,47737,467672,67651,167524,687406,367345,157553,887453,227566,817279,697059,997185,847075,547122,996977,346998,967154,547097,586853,46728,236883,36784,277085,446998,586725,496845,86765,146966,197113,657096,337200,17273,457284,507696,547628,157435,67793,267631,518397,918560,918895,429509,289569,9010172,1810617,7111400,1611919,9712714,2913310,1013816,6714518,2414721,9114534,8214993,6215159,515612,9415340,3715267) > par1 = '0' > ylab = 'Dichtheids Aantal werklozen 16 +' > xlab = 'Aantal werklozen ' > #'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/111yc1272730154.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 (120 obs.); Bandwidth 'bw' = 1.435e+05 x y Min. : -413205 Min. :9.907e-24 1st Qu.: 2225894 1st Qu.:1.732e-09 Median : 4864994 Median :1.457e-08 Mean : 4864994 Mean :9.463e-08 3rd Qu.: 7504093 3rd Qu.:2.615e-08 Max. :10143192 Max. :1.074e-06 > postscript(file="/var/www/html/rcomp/tmp/2tafx1272730154.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/3tafx1272730154.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/4tafx1272730154.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/5mkf01272730154.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/6mkf01272730154.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/7mkf01272730154.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/8pkvo1272730154.tab") > > try(system("convert tmp/111yc1272730154.ps tmp/111yc1272730154.png",intern=TRUE)) character(0) > try(system("convert tmp/2tafx1272730154.ps tmp/2tafx1272730154.png",intern=TRUE)) character(0) > try(system("convert tmp/3tafx1272730154.ps tmp/3tafx1272730154.png",intern=TRUE)) character(0) > try(system("convert tmp/4tafx1272730154.ps tmp/4tafx1272730154.png",intern=TRUE)) character(0) > try(system("convert tmp/5mkf01272730154.ps tmp/5mkf01272730154.png",intern=TRUE)) character(0) > try(system("convert tmp/6mkf01272730154.ps tmp/6mkf01272730154.png",intern=TRUE)) character(0) > try(system("convert tmp/7mkf01272730154.ps tmp/7mkf01272730154.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.455 1.219 2.990