R version 2.13.0 (2011-04-13) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-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. > y <- c(146283 + ,98364 + ,86146 + ,96933 + ,79234 + ,42551 + ,195663 + ,6853 + ,21529 + ,95757 + ,85584 + ,143983 + ,75851 + ,59238 + ,93163 + ,96037 + ,151511 + ,136368 + ,112642 + ,94728 + ,105499 + ,121527 + ,127766 + ,98958 + ,77900 + ,85646 + ,98579 + ,130767 + ,131741 + ,53907 + ,178812 + ,146761 + ,82036 + ,163253 + ,27032 + ,171975 + ,65990 + ,86572 + ,159676 + ,1929 + ,85371 + ,58391 + ,31580 + ,136815 + ,120642 + ,69107 + ,50495 + ,108016 + ,46341 + ,78348 + ,79336 + ,56968 + ,93176 + ,161632 + ,87850 + ,127969 + ,15049 + ,155135 + ,25109 + ,45824 + ,102996 + ,160604 + ,158051 + ,44547 + ,162647 + ,174141 + ,60622 + ,179566 + ,184301 + ,75661 + ,96144 + ,129847 + ,117286 + ,71180 + ,109377 + ,85298 + ,73631 + ,86767 + ,23824 + ,93487 + ,82981 + ,73815 + ,94552 + ,132190 + ,128754 + ,66363 + ,67808 + ,61724 + ,131722 + ,68580 + ,106175 + ,55792 + ,25157 + ,76669 + ,57283 + ,105805 + ,129484 + ,72413 + ,87831 + ,96971 + ,71299 + ,77494 + ,120336 + ,93913 + ,136048 + ,181248 + ,146123 + ,32036 + ,186646 + ,102255 + ,168237 + ,64219 + ,19630 + ,76825 + ,115338 + ,109427 + ,118168 + ,84845 + ,153197 + ,29877 + ,63506 + ,22445 + ,47695 + ,68370 + ,146304 + ,38233 + ,42071 + ,50517 + ,103950 + ,5841 + ,2341 + ,84396 + ,24610 + ,35753 + ,55515 + ,209056 + ,6622 + ,115814 + ,11609 + ,13155 + ,18274 + ,72875 + ,10112 + ,142775 + ,68847 + ,17659 + ,20112 + ,61023 + ,13983 + ,65176 + ,132432 + ,112494 + ,45109 + ,170875 + ,180759 + ,214921 + ,100226 + ,32043 + ,54454 + ,78876 + ,170745 + ,6940 + ,49025 + ,122037 + ,53782 + ,127748 + ,86839 + ,44830 + ,77395 + ,89324 + ,103300 + ,112283 + ,10901 + ,120691 + ,58106 + ,57140 + ,122422 + ,25899 + ,139296 + ,52678 + ,23853 + ,17306 + ,7953 + ,89455 + ,147866 + ,4245 + ,21509 + ,7670 + ,66675 + ,14336 + ,53608 + ,30059 + ,29668 + ,22097 + ,96841 + ,41907 + ,27080 + ,35885 + ,41247 + ,28313 + ,36845 + ,16548 + ,36134 + ,55764 + ,28910 + ,13339 + ,25319 + ,66956 + ,47487 + ,52785 + ,44683 + ,35619 + ,21920 + ,45608 + ,7721 + ,20634 + ,29788 + ,31931 + ,37754 + ,32505 + ,40557 + ,94238 + ,44197 + ,43228 + ,4103 + ,44144 + ,32868 + ,27640 + ,14063 + ,28990 + ,4694 + ,42648 + ,64329 + ,21928 + ,25836 + ,22779 + ,40820 + ,27530 + ,32378 + ,10824 + ,39613 + ,60865 + ,19787 + ,20107 + ,36605 + ,40961 + ,48231 + ,39725 + ,21455 + ,23430 + ,62991 + ,49363 + ,9604 + ,24552 + ,31493 + ,3439 + ,19555 + ,21228 + ,23177 + ,22094 + ,2342 + ,38798 + ,3255 + ,24261 + ,18511 + ,40798 + ,28893 + ,21425 + ,50276 + ,37643 + ,30377 + ,27126 + ,13 + ,42097 + ,24451 + ,14335 + ,5084 + ,9927 + ,43527 + ,27184 + ,21610 + ,20484 + ,20156 + ,6012 + ,18475 + ,12645 + ,11017 + ,37623 + ,35873) > x <- c(30,28,38,30,22,26,25,18,11,26,25,38,44,30,40,34,47,30,31,23,36,36,30,25,39,34,31,31,33,25,33,35,42,43,30,33,13,32,36,0,28,14,17,32,30,35,20,28,28,39,34,26,39,39,33,28,4,39,18,14,29,44,21,16,28,35,28,38,23,36,32,29,25,27,36,28,23,40,23,40,28,34,33,28,34,30,33,22,38,26,35,8,24,29,20,29,45,37,33,33,25,32,29,28,28,31,52,21,24,41,33,32,19,20,31,31,32,18,23,17,20,12,17,30,31,10,13,22,42,1,9,32,11,25,36,31,0,24,13,8,13,19,18,33,40,22,38,24,8,35,43,43,14,41,38,45,31,13,28,31,40,30,16,37,30,35,32,27,20,18,31,31,21,39,41,13,32,18,39,14,7,17,0,30,37,0,5,1,16,32,24,17,11,24,22,12,19,13,17,15,16,24,15,17,18,20,16,16,18,22,8,17,18,16,23,22,13,13,16,16,20,22,17,18,17,12,7,17,14,23,17,14,15,17,21,18,18,17,17,16,15,21,16,14,15,17,15,15,10,6,22,21,1,18,17,4,10,16,16,9,16,17,7,15,14,14,18,12,16,21,19,16,1,16,10,19,12,2,14,17,19,14,11,4,16,20,12,15,16) > par8 = 'terrain.colors' > par7 = 'Y' > par6 = 'Y' > par5 = '0' > par4 = '0' > par3 = '0' > par2 = '50' > par1 = '50' > ylab = 'y' > xlab = 'x' > main = 'Bivariate Kernel Density' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Dr. Ian E. Holliday > #To cite this work: Ian E. Holliday, 2011, 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: > #Technical description: > par1 <- as(par1,'numeric') > par2 <- as(par2,'numeric') > par3 <- as(par3,'numeric') > par4 <- as(par4,'numeric') > par5 <- as(par5,'numeric') > library('GenKern') Loading required package: KernSmooth KernSmooth 2.23 loaded Copyright M. P. Wand 1997-2009 > if (par3==0) par3 <- dpik(x) > if (par4==0) par4 <- dpik(y) > if (par5==0) par5 <- cor(x,y) > if (par1 > 500) par1 <- 500 > if (par2 > 500) par2 <- 500 > if (par8 == 'terrain.colors') mycol <- terrain.colors(100) > if (par8 == 'rainbow') mycol <- rainbow(100) > if (par8 == 'heat.colors') mycol <- heat.colors(100) > if (par8 == 'topo.colors') mycol <- topo.colors(100) > if (par8 == 'cm.colors') mycol <- cm.colors(100) > postscript(file="/var/wessaorg/rcomp/tmp/1u4481324134349.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > op <- KernSur(x,y, xgridsize=par1, ygridsize=par2, correlation=par5, xbandwidth=par3, ybandwidth=par4) > image(op$xords, op$yords, op$zden, col=mycol, axes=TRUE,main=main,xlab=xlab,ylab=ylab) > if (par6=='Y') contour(op$xords, op$yords, op$zden, add=TRUE) > if (par7=='Y') points(x,y) > (r<-lm(y ~ x)) Call: lm(formula = y ~ x) Coefficients: (Intercept) x -11868 3407 > abline(r) > box() > dev.off() null device 1 > > #Note: the /var/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Bandwidth',2,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'x axis',header=TRUE) > a<-table.element(a,par3) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'y axis',header=TRUE) > a<-table.element(a,par4) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Correlation',2,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'correlation used in KDE',header=TRUE) > a<-table.element(a,par5) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'correlation(x,y)',header=TRUE) > a<-table.element(a,cor(x,y)) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/2st581324134349.tab") > > try(system("convert tmp/1u4481324134349.ps tmp/1u4481324134349.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 5.368 0.207 5.603