R version 3.2.3 (2015-12-10) -- "Wooden Christmas-Tree" Copyright (C) 2015 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.00362546,-0.081538157,0.02321837,-0.007356826,0.034326162,-0.018621966,-0.049985063,-0.020844341,0.003152273,0.009700787,-0.017549096,0.030149978,0.086366074,-0.673017327,0.10498804,-0.1117681,0.028627252,-0.055901968,-1.084365526,1.90499258,-0.08324419,0.03202561,0.228846121,0.431890398) > x <- c(0.310084596,0.278403759,0.488085568,0.524136573,0.413733736,0.4681831,0.476715297,0.488284498,0.473341212,0.485132292,0.354395181,0.472117215,0.313855946,0.463167042,0.35890907,0.455290318,0.344383836,0.461334035,0.48928383,0.50146836,0.480779797,0.498951763,0.483351648,0.490403205) > ylab = 'VWC' > xlab = 'CH4' > #'GNU S' R Code compiled by R2WASP v. 1.2.291 () > #Author: root > #To cite this work: Wessa P., (2012), Spearman Rank Correlation (v1.0.1) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_spearman.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > # > k <- cor.test(x,y,method='spearman') > postscript(file="/var/wessaorg/rcomp/tmp/1t3td1453829452.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/2inf81453829452.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,'Spearman Rank Correlation',2,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'rho',header=TRUE) > a<-table.element(a,k$estimate) > 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$p.value) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'S',header=TRUE) > a<-table.element(a,k$statistic) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/364ps1453829452.tab") > > try(system("convert tmp/1t3td1453829452.ps tmp/1t3td1453829452.png",intern=TRUE)) character(0) > try(system("convert tmp/2inf81453829452.ps tmp/2inf81453829452.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.952 0.132 1.085