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(5714837,6015267,3415340,115612,615159,9714993,2414534,6614721,8414518,9513816,7713310,9212714,411919,3611400,710617,2410172,529569,269509,508895,308560,198397,977631,717793,57435,667628,57696,577284,677273,447200,327096,207113,616966,276765,866845,6725,576898,187085,966784,586883,476728,406853,217097,827154,526998,456977,427122,867075,157185,87059,657279,87566,67453,297553,227345,97406,187524,337651,397672,797737,717980,717784,897934,297932,108061,187927,887990,998136,288286,768212,988170,508491,438167) > par1 = '0' > ylab = 'Density' > xlab = 'Value' > #'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/1qf5c1266605629.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 (72 obs.); Bandwidth 'bw' = 1.706e+05 x y Min. : -504984 Min. :4.140e-16 1st Qu.: 2177937 1st Qu.:3.307e-09 Median : 4860859 Median :1.940e-08 Mean : 4860859 Mean :9.309e-08 3rd Qu.: 7543781 3rd Qu.:4.388e-08 Max. :10226702 Max. :9.055e-07 > postscript(file="/var/www/html/rcomp/tmp/2vt4c1266605629.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/3aa1d1266605629.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/4hcaj1266605629.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/5n7441266605629.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/69bxr1266605630.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/7v1w71266605630.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/8lz301266605630.tab") > > try(system("convert tmp/1qf5c1266605629.ps tmp/1qf5c1266605629.png",intern=TRUE)) character(0) > try(system("convert tmp/2vt4c1266605629.ps tmp/2vt4c1266605629.png",intern=TRUE)) character(0) > try(system("convert tmp/3aa1d1266605629.ps tmp/3aa1d1266605629.png",intern=TRUE)) character(0) > try(system("convert tmp/4hcaj1266605629.ps tmp/4hcaj1266605629.png",intern=TRUE)) character(0) > try(system("convert tmp/5n7441266605629.ps tmp/5n7441266605629.png",intern=TRUE)) character(0) > try(system("convert tmp/69bxr1266605630.ps tmp/69bxr1266605630.png",intern=TRUE)) character(0) > try(system("convert tmp/7v1w71266605630.ps tmp/7v1w71266605630.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.433 1.202 1.814