R version 3.0.2 (2013-09-25) -- "Frisbee Sailing" Copyright (C) 2013 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-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(0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,1 + ,2 + ,3 + ,1 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,3 + ,7 + ,2 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,4 + ,3 + ,6 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,3 + ,4 + ,2 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,2 + ,2 + ,2 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,3 + ,3 + ,4 + ,1 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,1 + ,2 + ,4 + ,1 + ,1 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,4 + ,5 + ,2 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,1 + ,1 + ,3 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,2 + ,0 + ,1 + ,3 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,4 + ,4 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,2 + ,1 + ,1 + ,3 + ,2 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,2 + ,2 + ,2 + ,0 + ,0 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0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,5 + ,7 + ,3 + ,4 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,2 + ,4 + ,2 + ,3 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,3 + ,0 + ,1 + ,2 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,4 + ,6 + ,1 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,4 + ,3 + ,3 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,4 + ,7 + ,4 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,1 + ,3 + ,5 + ,5 + ,2 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,3 + ,8 + ,0 + ,0 + ,0) > x <- c(14.15 + ,13.95 + ,13.96 + ,13.99 + ,14.08 + ,14.03 + ,13.93 + ,13.95 + ,13.94 + ,14.01 + ,13.98 + ,13.84 + ,14.16 + ,13.92 + ,13.97 + ,14 + ,14 + ,13.87 + ,13.94 + ,13.98 + ,13.95 + ,14.01 + ,13.96 + ,13.88 + ,13.76 + ,13.79 + ,13.97 + ,13.84 + ,13.94 + ,13.97 + ,13.92 + ,13.87 + ,13.9 + ,13.85 + ,13.7 + ,13.87 + ,13.74 + ,13.64 + ,13.83 + ,13.88 + ,14.01 + ,13.98 + ,14.02 + ,14.1 + ,14.11 + ,14.14 + ,14.04 + ,14.19 + ,14.17 + ,14.14 + ,13.94 + ,14.09 + ,14.06 + ,14.07 + ,14.07 + ,14.07 + ,14.05 + ,13.99 + ,13.85 + ,13.95 + ,14.13 + ,14.2 + ,14.2 + ,14.18 + ,14.13 + ,14.07 + ,14.06 + ,14.07 + ,14.1 + ,14.1 + ,14 + ,14.16 + ,13.85 + ,13.97 + ,13.91 + ,13.9 + ,13.83 + ,13.9 + ,13.79 + ,13.88 + ,13.94 + ,13.95 + ,14.08 + ,13.87 + ,14.16 + ,13.9 + ,13.74 + ,13.82 + ,13.82 + ,13.88 + ,13.9 + ,14.04 + ,13.92 + ,13.96 + ,13.8 + ,13.74 + ,13.84 + ,13.71 + ,13.78 + ,13.78 + ,13.76 + ,13.81 + ,13.87 + ,13.76 + ,13.82 + ,13.82 + ,13.83 + ,13.91 + ,13.92 + ,14 + ,13.99 + ,14.01 + ,14.09 + ,14.13 + ,14.03 + ,14.1 + ,14.05 + ,14.02 + ,14.11 + ,14.21 + ,14.38 + ,14.23 + ,14.1 + ,14.04 + ,14.12 + ,14 + ,14.11 + ,14.03 + ,14.03 + ,14.04 + ,14.06 + ,14.1 + ,14.11 + ,14.12 + ,14.24 + ,14.17 + ,14.08 + ,14.07 + ,14.09 + ,14.02 + ,14.01 + ,13.98 + ,13.92 + ,14.03 + ,14.01 + ,14.19 + ,13.73 + ,13.92 + ,13.94 + ,14.03 + ,14.04 + ,14.03 + ,14.07 + ,14.04 + ,13.93 + ,14.17 + ,14.06 + ,14.2 + ,14.16 + ,14.11 + ,14.16 + ,14.13 + ,14.01 + ,14.05 + ,14.04 + ,14.1 + ,14.05 + ,14.02 + ,14.11 + ,14.21 + ,14.38 + ,14.23 + ,14.1 + ,14.04 + ,14.12 + ,14 + ,14.11 + ,14.03 + ,14.03 + ,14.04 + ,14.06 + ,14.1 + ,14.11 + ,14.12 + ,14.24 + ,14.17 + ,14.08 + ,14.07 + ,14.09 + ,14.02 + ,14.01 + ,13.98 + ,13.92 + ,14.03 + ,14.01 + ,14.19 + ,13.73 + ,13.92 + ,13.94 + ,14.03 + ,14.04 + ,14.03 + ,14.07 + ,14.04 + ,13.93 + ,14.17 + ,14.06 + ,14.2 + ,14.16 + ,14.11 + ,14.16 + ,14.13 + ,14.01 + ,14.05 + ,14.04 + ,14.03 + ,14.04 + ,13.9 + ,14.09 + ,14.16 + ,14.09 + ,14.08 + ,13.95 + ,14.01 + ,14 + ,13.99 + ,14 + ,14.02 + ,14.06 + ,14.02 + ,13.97 + ,14.19 + ,13.97 + ,13.98 + ,14.03 + ,14.04 + ,14.13 + ,14.22 + ,14.21 + ,14.15 + ,14.17 + ,14.03 + ,14.02 + ,13.91 + ,13.81 + ,13.78 + ,13.83 + ,13.96 + ,13.9 + ,14.1 + ,13.99 + ,13.9 + ,13.88 + ,13.89 + ,14.03 + ,14.19 + ,14.16 + ,14.1 + ,14.03 + ,14.06 + ,14.07 + ,14.11 + ,14.17 + ,14.23 + ,14.11 + ,14.25 + ,14.03 + ,14.07 + ,13.99 + ,14.01 + ,13.98 + ,13.93 + ,14.06 + ,13.98 + ,14 + ,13.86 + ,13.98 + ,13.8 + ,13.8 + ,13.89 + ,13.88 + ,13.78 + ,13.89 + ,13.93 + ,13.95 + ,13.92 + ,13.96 + ,13.91 + ,13.76 + ,13.79 + ,13.99 + ,13.99 + ,13.99 + ,14.04 + ,14.01 + ,14.13 + ,14.01 + ,14.07 + ,14.04 + ,14.18 + ,14.26 + ,14.31 + ,14.26 + ,14.2 + ,14.18 + ,14.14 + ,14.08 + ,14 + ,14.04 + ,14.08 + ,14 + ,13.94 + ,13.83 + ,13.75 + ,13.92 + ,13.91 + ,13.91 + ,13.9 + ,13.95 + ,14.02 + ,13.89 + ,13.89 + ,13.89 + ,13.87 + ,14.03 + ,13.96 + ,14.06 + ,13.98 + ,14.08 + ,13.95 + ,13.95 + ,13.84 + ,13.94 + ,13.88 + ,13.83 + ,13.8 + ,13.92 + ,13.9 + ,13.73 + ,13.87 + ,13.76 + ,13.86 + ,13.9 + ,13.85 + ,13.9 + ,13.75 + ,13.87 + ,13.97 + ,13.97 + ,14.14 + ,14.18 + ,14.17 + ,14.2 + ,14.17 + ,14.15 + ,14.1 + ,14.04 + ,14.01 + ,14.15 + ,14.03 + ,14.04 + ,14.05 + ,14.12 + ,14.09 + ,13.98 + ,13.94 + ,14.04 + ,13.86 + ,14.03 + ,13.99 + ,14.08 + ,14.01 + ,14.04 + ,13.9 + ,14.09 + ,14.04 + ,13.97 + ,14.08 + ,13.99 + ,14.11 + ,14.16 + ,14.18 + ,14.18 + ,14.38 + ,14.18 + ,14.22 + ,14.13 + ,14.2 + ,14.25 + ,14.14 + ,14.15 + ,14.13 + ,14.1 + ,14.09 + ,14.23 + ,14.11 + ,14.4 + ,14.3 + ,14.37 + ,14.24 + ,14.14 + ,14.17 + ,14.19 + ,14.24 + ,14.11 + ,14.07 + ,14.15 + ,14.28 + ,14.03 + ,14.06 + ,13.94 + ,14.05 + ,14.12 + ,14 + ,14.12 + ,13.99 + ,14.04 + ,14.05 + ,14.06 + ,14.33 + ,14.45 + ,14.39 + ,14.39 + ,14.23 + ,14.25 + ,14.15 + ,14.12 + ,14.26 + ,14.28 + ,14.12 + ,14.29 + ,14.12 + ,14.22 + ,14.09 + ,14.17 + ,14.01 + ,14.22 + ,13.98 + ,14.12 + ,14.09 + ,14.11 + ,14.05 + ,13.96 + ,13.81 + ,14.09 + ,13.87 + ,14.1 + ,14.08 + ,14.09 + ,14.08 + ,13.95 + ,14.08 + ,14 + ,14.05 + ,13.98 + ,14.04 + ,14.24 + ,14.28 + ,14.23 + ,14.16 + ,14.11 + ,14.07 + ,14.07 + ,14.08 + ,14.02 + ,14.08 + ,14.01 + ,14.08 + ,14.23 + ,14.39 + ,14.13 + ,14.21 + ,14.21 + ,14.26 + ,14.36 + ,14.18 + ,14.34 + ,14.26 + ,14.22 + ,14.46 + ,14.51 + ,14.32 + ,14.44 + ,14.35 + ,14.3 + ,14.32 + ,14.24 + ,14.27 + ,14.26 + ,14.26 + ,14.05 + ,14.22 + ,14.11 + ,14.25 + ,14.26 + ,14.16 + ,14.07 + ,14.06 + ,14.22 + ,14.24 + ,14.25 + ,14.23 + ,14.14 + ,14.29 + ,14.33 + ,14.34 + ,14.65 + ,14.43 + ,14.32 + ,14.31 + ,14.34 + ,14.28 + ,14.23 + ,14.4 + ,14.45 + ,14.39 + ,14.35 + ,14.43 + ,14.29 + ,14.41 + ,14.31 + ,14.42 + ,14.43 + ,14.3 + ,14.36 + ,14.22 + ,14.16 + ,14.2 + ,14.38 + ,14.37 + ,14.34 + ,14.19 + ,14.22 + ,14.15 + ,14 + ,14.01 + ,13.94 + ,14 + ,13.93 + ,14.13 + ,14.28 + ,14.26 + ,14.3 + ,14.18 + ,14.18 + ,14.1 + ,14.09 + ,14.03 + ,14.02 + ,14.16 + ,14 + ,14.14 + ,14.28 + ,13.94 + ,14.25 + ,14.26 + ,14.22 + ,14.29 + ,14.2 + ,14.19 + ,14.25 + ,14.38 + ,14.37 + ,14.29 + ,14.44 + ,14.7 + ,14.44 + ,14.34 + ,14.11 + ,14.33 + ,14.46 + ,14.37 + ,14.24 + ,14.42 + ,14.37 + ,14.26 + ,14.23 + ,14.43 + ,14.25 + ,14.2 + ,14.21 + ,14.18 + ,14.3 + ,14.32 + ,14.16 + ,14.15 + ,14.28 + ,14.31 + ,14.27 + ,14.31 + ,14.46 + ,14.33 + ,14.31 + ,14.43 + ,14.28 + ,14.36 + ,14.45 + ,14.5 + ,14.55 + ,14.53 + ,14.55 + ,14.83 + ,14.56 + ,14.58 + ,14.59 + ,14.59 + ,14.67 + ,14.6 + ,14.43 + ,14.42 + ,14.4 + ,14.51 + ,14.45 + ,14.64 + ,14.27 + ,14.28 + ,14.23 + ,14.28 + ,14.26 + ,14.27 + ,14.25 + ,14.3 + ,14.32 + ,14.37 + ,14.21 + ,14.49 + ,14.46 + ,14.5 + ,14.3 + ,14.31 + ,14.28 + ,14.37 + ,14.29 + ,14.21 + ,14.21 + ,14.19 + ,14.38 + ,14.4 + ,14.56 + ,14.42 + ,14.47 + ,14.45 + ,14.46 + ,14.45 + ,14.45 + ,14.43 + ,14.68 + ,14.47 + ,14.74 + ,14.75 + ,14.81 + ,14.54 + ,14.51 + ,14.43 + ,14.53 + ,14.43 + ,14.46 + ,14.48 + ,14.51 + ,14.33) > par8 = 'terrain.colors' > par7 = 'Y' > par6 = 'Y' > par5 = '0' > par4 = '0' > par3 = '0' > par2 = '50' > par1 = '50' > ylab = 'hurricanes' > xlab = 'temperature' > main = 'Bivariate Kernel Density' > par8 <- 'terrain.colors' > par7 <- 'Y' > par6 <- 'Y' > par5 <- '0' > par4 <- '0' > par3 <- '0' > par2 <- '50' > par1 <- '50' > #'GNU S' R Code compiled by R2WASP v. 1.2.291 () > #Author: root > #To cite this work: Wessa P. (2012), Bivariate Kernel Density Estimation (v1.0.9) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/Ian.Holliday/rwasp_bidensity.wasp/ > #Source of accompanying publication: > # > 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 > x <- x[!is.na(y)] > y <- y[!is.na(y)] > y <- y[!is.na(x)] > x <- x[!is.na(x)] > 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/14f911410952551.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 0.973176 -0.009155 > 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/2jvil1410952551.tab") > > try(system("convert tmp/14f911410952551.ps tmp/14f911410952551.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.025 0.109 1.137