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(10.4,9.43,10.54,14.81,13.95,14.03,12.74,12.34,14.29,15.63,18.91,19.5,15.93,15.09,14.56,12.97,11.71,11.47,11.41,12.49,14.2,12.95,11.49,10.38,10.51,10.06,8.92,8,7.59,8.65,10.24,10.78,10.38,9.98,8.95,8.26,10.1,14.78,15.96,15.83,13.81,13.06,11.34,10.3) > x <- c(59,56,56,67,67,67,67,64,64,56,56,62,62,58,58,59,59,60,60,61,61,59,59,47,47,48,48,49,49,49,49,47,47,46,46,54,54,59,59,44,44,46,46,43) > ylab = 'Black unemployment' > xlab = 'House Democrats' > #'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/1jf8r1424034965.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=8.3333333333333) > > plot(x,y,main='Scatterplot',xlab=xlab,ylab=ylab) > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/2f7ak1424034965.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=8.3333333333333) > > plot(rank(x),rank(y),main='Scatterplot of Ranks',xlab=xlab,ylab=ylab) > grid() > 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,'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/30vaz1424034965.tab") > > try(system("convert tmp/1jf8r1424034965.ps tmp/1jf8r1424034965.png",intern=TRUE)) character(0) > try(system("convert tmp/2f7ak1424034965.ps tmp/2f7ak1424034965.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.002 0.202 1.205