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(562.674,599.000,668.516,597.798,579.889,668.233,499.232,215.187,555.813,586.935,546.136,571.111,634.712,639.283,712.182,621.557,621.000,675.989,501.322,220.286,560.727,602.530,626.379,605.508,646.783,658.442,712.906,687.714,723.916,707.183,629.000,237.530,613.296,730.444,734.925,651.812,676.155,748.183,810.681,729.363,701.108,790.079,594.621,230.716,617.189,691.389,701.067,705.777,747.636,773.392,813.788,766.713,728.875,749.197,680.954,241.424,680.234,708.326,694.238,772.071,795.337,788.421,889.968,797.393,751.000,821.255,691.605,290.655,727.147,868.355,812.390,799.556,843.038,847.000,941.952,804.309,840.307,871.528,656.330,370.508,742.000,847.152,731.675,898.527,778.139,856.075,938.833,813.023,783.417,828.110,657.311,310.032,780.000,860.000,780.000,807.993,895.217,856.075,893.268,875.000,835.088,934.595,832.500,300.000,791.443,900.000,781.729,880.000,875.024,992.968,976.804,968.697,871.675,1006.852,832.037,345.587,849.528,913.871,868.746,993.733) > 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/1bush1266686124.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' = 51.53 x y Min. : 60.61 Min. :1.556e-06 1st Qu.: 335.81 1st Qu.:1.647e-04 Median : 611.02 Median :4.177e-04 Mean : 611.02 Mean :9.075e-04 3rd Qu.: 886.23 3rd Qu.:1.773e-03 Max. :1161.43 Max. :2.585e-03 > postscript(file="/var/www/html/rcomp/tmp/23xps1266686124.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/38iy31266686124.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/4bsf91266686124.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/5x2741266686124.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/605pk1266686124.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/7jby81266686124.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/82i1q1266686124.tab") > > try(system("convert tmp/1bush1266686124.ps tmp/1bush1266686124.png",intern=TRUE)) character(0) > try(system("convert tmp/23xps1266686124.ps tmp/23xps1266686124.png",intern=TRUE)) character(0) > try(system("convert tmp/38iy31266686124.ps tmp/38iy31266686124.png",intern=TRUE)) character(0) > try(system("convert tmp/4bsf91266686124.ps tmp/4bsf91266686124.png",intern=TRUE)) character(0) > try(system("convert tmp/5x2741266686124.ps tmp/5x2741266686124.png",intern=TRUE)) character(0) > try(system("convert tmp/605pk1266686124.ps tmp/605pk1266686124.png",intern=TRUE)) character(0) > try(system("convert tmp/7jby81266686124.ps tmp/7jby81266686124.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.331 1.105 2.159