R version 2.13.0 (2011-04-13) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-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. > > RC.capture <- function (expression, collapse = NULL) { + resultConn <- textConnection('RC.resultText', open = 'w', local=TRUE) + sink(resultConn) + on.exit(function() { + sink() + close(resultConn) + }) + expression + on.exit(NULL) + sink() + close(resultConn) + return(paste(c(RC.resultText, ''), collapse = collapse, sep = '')) + } > RC.texteval <- function (sourceText, collapse = NULL, echo = TRUE) { + sourceConn <- textConnection(sourceText, open = 'r') + on.exit(close(sourceConn)) + result <- RC.capture(source(file = sourceConn, local = FALSE, echo = echo, print.eval = TRUE), collapse = collapse) + on.exit(NULL) + close(sourceConn) + res <- '' + for(i in 1:length(result)) { + if (result[i]!='') res <- paste(res,result[i],' + ',sep='') + } + return(res) + } > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Dr. Ian E. Holliday > #To cite this work: Ian E. Holliday, 2011, 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: > #Technical description: > library(coin) Loading required package: survival Loading required package: splines Loading required package: mvtnorm Loading required package: modeltools Loading required package: stats4 > z <- as.data.frame(read.table(file='http://www.wessa.net/download/PLoS_ONE/t1.csv',sep=',',header=T)) > (t1 <- t.test(z[z$Year==0,'WSTOT'],z[z$Year==1,'WSTOT'])) Welch Two Sample t-test data: z[z$Year == 0, "WSTOT"] and z[z$Year == 1, "WSTOT"] t = -0.2128, df = 378.371, p-value = 0.8316 alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: -51.53062 41.46391 sample estimates: mean of x mean of y 554.6824 559.7157 > (w1 <- wilcox_test(z$WSTOT ~ as.factor(z$Year))) Asymptotic Wilcoxon Mann-Whitney Rank Sum Test data: z$WSTOT by as.factor(z$Year) (0, 1) Z = -0.3289, p-value = 0.7423 alternative hypothesis: true mu is not equal to 0 > postscript(file="/var/wessaorg/rcomp/tmp/1t6y11322414494.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > boxplot(cbind(z[z$Year==0,'WSTOT'], z[z$Year==1,'WSTOT']), notch=T, main='Difference between Workshop Scores?') Warning message: In cbind(z[z$Year == 0, "WSTOT"], z[z$Year == 1, "WSTOT"]) : number of rows of result is not a multiple of vector length (arg 2) > dev.off() null device 1 > z <- as.data.frame(read.table(file='http://www.wessa.net/download/PLoS_ONE/t2.csv',sep=',',header=T)) > (t2 <- t.test(z[z$Year==0,'Relevance'],z[z$Year==1,'Relevance'])) Welch Two Sample t-test data: z[z$Year == 0, "Relevance"] and z[z$Year == 1, "Relevance"] t = -0.3483, df = 410.06, p-value = 0.7278 alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: -0.9854203 0.6888020 sample estimates: mean of x mean of y 30.61836 30.76667 > (w2 <- wilcox_test(z$Relevance ~ as.factor(z$Year))) Asymptotic Wilcoxon Mann-Whitney Rank Sum Test data: z$Relevance by as.factor(z$Year) (0, 1) Z = 0.1173, p-value = 0.9066 alternative hypothesis: true mu is not equal to 0 > postscript(file="/var/wessaorg/rcomp/tmp/2mwuf1322414494.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > boxplot(cbind(z[z$Year==0,'Relevance'], z[z$Year==1,'Relevance']), notch=T, main='Difference between Perceived Relevance (COLLES construct)?') Warning message: In cbind(z[z$Year == 0, "Relevance"], z[z$Year == 1, "Relevance"]) : number of rows of result is not a multiple of vector length (arg 1) > dev.off() null device 1 > (t3 <- t.test(z[z$Year==0,'CriticalThinking'],z[z$Year==1,'CriticalThinking'])) Welch Two Sample t-test data: z[z$Year == 0, "CriticalThinking"] and z[z$Year == 1, "CriticalThinking"] t = 1.2576, df = 411.987, p-value = 0.2092 alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: -0.3134206 1.4267401 sample estimates: mean of x mean of y 30.63285 30.07619 > (w3 <- wilcox_test(z$CriticalThinking ~ as.factor(z$Year))) Asymptotic Wilcoxon Mann-Whitney Rank Sum Test data: z$CriticalThinking by as.factor(z$Year) (0, 1) Z = 1.1916, p-value = 0.2334 alternative hypothesis: true mu is not equal to 0 > postscript(file="/var/wessaorg/rcomp/tmp/3ajj91322414494.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > boxplot(cbind(z[z$Year==0,'CriticalThinking'], z[z$Year==1,'CriticalThinking']), notch=T, main='Difference between Critical Thinking (COLLES construct)?') Warning message: In cbind(z[z$Year == 0, "CriticalThinking"], z[z$Year == 1, "CriticalThinking"]) : number of rows of result is not a multiple of vector length (arg 1) > dev.off() null device 1 > (t4 <- t.test(z[z$Year==0,'CognitiveDemand'],z[z$Year==1,'CognitiveDemand'])) Welch Two Sample t-test data: z[z$Year == 0, "CognitiveDemand"] and z[z$Year == 1, "CognitiveDemand"] t = 0.9616, df = 413.381, p-value = 0.3368 alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: -0.4468054 1.3025680 sample estimates: mean of x mean of y 31.61836 31.19048 > (w4 <- wilcox_test(z$CognitiveDemand ~ as.factor(z$Year))) Asymptotic Wilcoxon Mann-Whitney Rank Sum Test data: z$CognitiveDemand by as.factor(z$Year) (0, 1) Z = 0.6577, p-value = 0.5107 alternative hypothesis: true mu is not equal to 0 > postscript(file="/var/wessaorg/rcomp/tmp/4mejh1322414494.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > boxplot(cbind(z[z$Year==0,'CognitiveDemand'], z[z$Year==1,'CognitiveDemand']), notch=T, main='Difference between Cognitive Demand (COLLES construct)?') Warning message: In cbind(z[z$Year == 0, "CognitiveDemand"], z[z$Year == 1, "CognitiveDemand"]) : number of rows of result is not a multiple of vector length (arg 1) > 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,'Statistical Hypothesis Tests',1,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,paste('
',RC.texteval('t1'),'
',sep='')) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,paste('
',RC.texteval('w1'),'
',sep='')) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,paste('
',RC.texteval('t2'),'
',sep='')) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,paste('
',RC.texteval('w2'),'
',sep='')) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,paste('
',RC.texteval('t3'),'
',sep='')) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,paste('
',RC.texteval('w3'),'
',sep='')) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,paste('
',RC.texteval('t4'),'
',sep='')) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,paste('
',RC.texteval('w4'),'
',sep='')) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/5r13w1322414494.tab") > > try(system("convert tmp/1t6y11322414494.ps tmp/1t6y11322414494.png",intern=TRUE)) character(0) > try(system("convert tmp/2mwuf1322414494.ps tmp/2mwuf1322414494.png",intern=TRUE)) character(0) > try(system("convert tmp/3ajj91322414494.ps tmp/3ajj91322414494.png",intern=TRUE)) character(0) > try(system("convert tmp/4mejh1322414494.ps tmp/4mejh1322414494.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.642 0.216 2.311