R version 2.8.0 (2008-10-20) Copyright (C) 2008 The R Foundation for Statistical Computing ISBN 3-900051-07-0 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. Natural language support but running in an English locale 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. > x <- array(list(0,1,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,0,1,1,1,1,1,0,0,0,1,1,1,0,1,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,1,0,1,0,0,1,1,1,1),dim=c(2,33),dimnames=list(c('A','B'),1:33)) > y <- array(NA,dim=c(2,33),dimnames=list(c('A','B'),1:33)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par6 = '' > par5 = 'paired' > par4 = 'two.sided' > par3 = '0.95' > par2 = '2' > par1 = '1' > main = 'Two Samples' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Dr. Ian E. Holliday > #To cite this work: Ian E. Holliday, 2009, 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: > par1 <- as.numeric(par1) #column number of first sample > par2 <- as.numeric(par2) #column number of second sample > par3 <- as.numeric(par3) #confidence (= 1 - alpha) > if (par5 == 'unpaired') paired <- FALSE else paired <- TRUE > par6 <- as.numeric(par6) #H0 > z <- t(y) > if (par1 == par2) stop('Please, select two different column numbers') > if (par1 < 1) stop('Please, select a column number greater than zero for the first sample') > if (par2 < 1) stop('Please, select a column number greater than zero for the second sample') > if (par1 > length(z[1,])) stop('The column number for the first sample should be smaller') > if (par2 > length(z[1,])) stop('The column number for the second sample should be smaller') > if (par3 <= 0) stop('The confidence level should be larger than zero') > if (par3 >= 1) stop('The confidence level should be smaller than zero') > (r.t <- t.test(z[,par1],z[,par2],var.equal=TRUE,alternative=par4,paired=paired,mu=par6,conf.level=par3)) Error in t.test.default(z[, par1], z[, par2], var.equal = TRUE, alternative = par4, : 'mu' must be a single number Calls: t.test -> t.test.default Execution halted