R version 2.7.0 (2008-04-22) Copyright (C) 2008 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. > y <- c(266.4,304.4,250.2,219,279.6,258.8,266.1,266.1,263.2,273.1,234.9,277.4,283.7,295.9,328.3,350.5,379.9,308.8,324,340.5,343.6,450.5,377.2,383.6,355.2,336,388,393.1,343.2,380.5,408.2,342.2,356.7,403.3,298.7,348,340.3,313.4,278.7,298.7,295.8,292.1,363.2,261.2,259.3,288.8,284.5,257.4,231.7,293,349.3,310.8,361.7,475.9,422.7,458.4,435.3,440.7,382.5,489.3,552.9,651.5,643.5,587.9,722.9,566,760.6,642.4,903.1,1025.5,792.6,758.4,744,653.1,549,575.2,736,716.4,747.2,708.3,810.4,704.1,619.4,573.4,514.4,507.2,608.1,632.7,715.3,617,690.8,608.5,712.3,746.5,676.4,681.7,628.9,642.4,776,767.8,611.8,716.7,718.4,638.1,630.2,712.5,591.1,728.4,557.3,597.9,706.4,712.6,711.3,553.3,762.1,833.1,798.4,885.7,880.3,850.8,747.4,801,983.8,1004.2,870.4,846.5,889.9,1103.9,1200.9,1182.2,1073.9,1029.8,986.4,1071.3,1251.2,1114.6,1197.5,1305.5,1279.9,1109.9,1024.9,1024.6,815.2,853.8,952.3,967.7,1065.7,994.1,1150,1110.6,1129.7,1142.7,1225.7,1527.6,1345.5,1508.5,1608.3,1437.8,1501.2,1419.3,1440.7,1619.2) > x <- c(227.3,222.9,263.6,208.6,242,245.6,199.5,213.6,241.9,242,230.6,193.9,235.5,228.3,227.3,215.7,219.3,218,215.4,193.6,225.7,235.8,211.9,199.1,222.5,217.9,229,244.3,220.8,234.3,215.2,201.7,258.6,271,228.7,230.3,243.9,231.3,276.6,256.9,238,256.7,233.8,199.9,263.9,255.6,237.7,229.2,223.9,235.2,290.2,269.6,246.3,287.7,234.3,238.3,296.7,282.5,292.5,298.9,284.7,309.5,356.3,302.6,345.3,353.9,297.2,299.6,355.8,348.3,340.5,310.1,323.5,307.9,354.5,298,306.6,302.3,291.7,280.7,311.5,334,320.8,266.4,318.9,306.4,338.9,330.3,314.4,316,310,272.4,327.6,343.9,315.8,279.8,323.7,300.6,326.8,314.7,293.1,313.9,304.7,269.9,332.2,346.5,295.8,297.9,304.3,306.7,359.2,325.3,302.4,351.2,310.8,289.6,355.8,335.5,332,310.7,297.1,291.9,326,311.8,294.5,330,297.7,290.3,338,319,316.3,304.3,305.6,304,353.8,308.7,325.2,337.2,304.6,320.8,327.1,360.4,346.3,325.2,322.9,337,367.8,329.7,333.7,338.1,331.1,316,343.1,374.4,343.7,283,362.7,359.2,337.4,389.9,326.2,348.1) > par7 = 'Y' > par6 = 'Y' > par5 = '0' > par4 = '0' > par3 = '0' > par2 = '50' > par1 = '50' > ylab = 'papier productie' > xlab = 'geraffineerde olieproducten' > main = 'Bivariate Kernel Density' > #'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: Write here your technical program description (don't use hard returns!) > 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.22 installed Copyright M. P. Wand 1997 Loading GenKern version 1.1 Copyright Lucy and Aykroyd 2000 last update October 2004 requires KernSmooth Package GenKern installed > 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 > postscript(file="/var/www/html/rcomp/tmp/12bmf1226436218.ps",horizontal=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=terrain.colors(100), 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 -936.919 5.553 > abline(r) > box() > 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,'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/www/html/rcomp/tmp/2dea71226436218.tab") > > system("convert tmp/12bmf1226436218.ps tmp/12bmf1226436218.png") > > > proc.time() user system elapsed 1.578 0.487 1.635