R version 3.2.4 Revised (2016-03-16 r70336) -- "Very Secure Dishes" Copyright (C) 2016 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.8,10.0,9.6,8.8,8.0,7.4,7.0,8.1,9.6,10.1,9.6,8.9,8.2,8.3,10.6,16.3,16.7,15.9,14.7,13.8,12.0,10.5,9.8) > x <- c(1461.75,1515.74,1560.48,1601.12,1652.46,1701.84,1788.95,1862.85,2010.89,2159.9,2292.84,2471.96,2655.05,2728.69,2982.54,3517.68,3457.08,3603.06,3536.95,3454.65,3506.11,3688.29,3951.31) > ylab = 'U-6' > xlab = 'Spending' > #'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/1g5jm1460160895.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() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/24dk61460160895.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() 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/3dn6m1460160895.tab") > > try(system("convert tmp/1g5jm1460160895.ps tmp/1g5jm1460160895.png",intern=TRUE)) character(0) > try(system("convert tmp/24dk61460160895.ps tmp/24dk61460160895.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.875 0.142 1.020