y <- c(3.8,49.15,17.95)
x <- c(0.355061993,0.229629636,0.310237825)
ylab = '% Occ Type IIA Open'
xlab = 'NOMO Symmetric'
#'GNU S' R Code compiled by R2WASP v. 1.2.291 ()
#Author: root
#To cite this work: Wessa, (2012), Kendall tau Rank Correlation (v1.0.11) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_kendall.wasp/
#Source of accompanying publication: Office for Research, Development, and Education
#
library('Kendall')
k <- Kendall(x,y)
postscript(file="/var/wessaorg/rcomp/tmp/14rej1422834656.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) 

plot(x,y,main='Scatterplot',xlab=xlab,ylab=ylab)
grid()
dev.off()
postscript(file="/var/wessaorg/rcomp/tmp/2sopi1422834656.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) 

plot(rank(x),rank(y),main='Scatterplot of Ranks',xlab=xlab,ylab=ylab)
grid()
dev.off()

#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,'Kendall tau Rank Correlation',2,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Kendall tau',header=TRUE)
a<-table.element(a,k$tau)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'2-sided p-value',header=TRUE)
a<-table.element(a,k$sl)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Score',header=TRUE)
a<-table.element(a,k$S)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Var(Score)',header=TRUE)
a<-table.element(a,k$varS)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Denominator',header=TRUE)
a<-table.element(a,k$D)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file="/var/wessaorg/rcomp/tmp/35lz81422834656.tab") 

try(system("convert tmp/14rej1422834656.ps tmp/14rej1422834656.png",intern=TRUE))
try(system("convert tmp/2sopi1422834656.ps tmp/2sopi1422834656.png",intern=TRUE))

