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(20.17189271 + ,20.53392781 + ,19.64463033 + ,19.97968779 + ,19.45628927 + ,19.40604948 + ,19.88019273 + ,19.73521726 + ,20.12990688 + ,20.6073619 + ,20.77625203 + ,20.14801868 + ,20.66320224 + ,19.62644661 + ,20.59234173 + ,19.13635621 + ,20.96329588 + ,20.42707069 + ,20.98573763 + ,19.4031677 + ,19.83464215 + ,20.34532079 + ,20.94307685 + ,20.28830145 + ,19.65026754 + ,19.76967336 + ,20.53343005 + ,20.68566962 + ,20.57480921 + ,19.14490759 + ,19.6798317 + ,19.30065147 + ,19.62928549 + ,19.87496654 + ,19.19808921 + ,19.94992879 + ,20.29878525 + ,20.528385 + ,20.10014631 + ,19.76277369 + ,19.62146816 + ,20.22979946 + ,19.65651795 + ,19.39589642 + ,19.70374828 + ,20.92256853 + ,20.19172273 + ,20.30919147 + ,20.52290658 + ,20.41289313 + ,19.58850477 + ,19.32763656 + ,20.6035554 + ,20.70403344 + ,20.479693 + ,19.49571635 + ,20.89469416 + ,20.66967696 + ,20.6770873 + ,19.26685734 + ,20.28329282 + ,20.66911338 + ,20.18269596 + ,19.55496113 + ,20.32315182 + ,19.87522287 + ,19.48203452 + ,19.66533702 + ,19.05749373 + ,19.18119756 + ,19.73373111 + ,20.03642226 + ,20.17963736 + ,19.53018121 + ,19.44489319 + ,19.77497503 + ,19.07661744 + ,20.07264842 + ,19.41605412 + ,19.79779019 + ,20.3706997 + ,20.65284083 + ,19.54880554 + ,19.3123082 + ,19.53696962 + ,20.64700175 + ,19.54269692 + ,19.36618795 + ,19.52507445 + ,20.30689343 + ,20.30600349 + ,20.41234755 + ,20.71441045 + ,20.39240198 + ,20.25446332 + ,20.15440099 + ,19.51327547 + ,19.4325975 + ,19.08689042 + ,19.51483098 + ,20.97260074 + ,20.4457596 + ,20.95343817 + ,19.2382952 + ,19.8382021) > 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/1axx11289549485.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 (105 obs.); Bandwidth 'bw' = 0.1921 x y Min. :18.48 Min. :0.0007012 1st Qu.:19.25 1st Qu.:0.0733029 Median :20.02 Median :0.3923057 Mean :20.02 Mean :0.3242332 3rd Qu.:20.79 3rd Qu.:0.5314536 Max. :21.56 Max. :0.6435269 > postscript(file="/var/www/html/rcomp/tmp/2xlpy1289549485.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/3xlpy1289549485.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/48co11289549485.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/58co11289549485.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/68co11289549485.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/71m541289549485.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/8mm4s1289549485.tab") > > try(system("convert tmp/1axx11289549485.ps tmp/1axx11289549485.png",intern=TRUE)) character(0) > try(system("convert tmp/2xlpy1289549485.ps tmp/2xlpy1289549485.png",intern=TRUE)) character(0) > try(system("convert tmp/3xlpy1289549485.ps tmp/3xlpy1289549485.png",intern=TRUE)) character(0) > try(system("convert tmp/48co11289549485.ps tmp/48co11289549485.png",intern=TRUE)) character(0) > try(system("convert tmp/58co11289549485.ps tmp/58co11289549485.png",intern=TRUE)) character(0) > try(system("convert tmp/68co11289549485.ps tmp/68co11289549485.png",intern=TRUE)) character(0) > try(system("convert tmp/71m541289549485.ps tmp/71m541289549485.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.375 1.159 1.841