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. > x <- c(26,20,19,20,25,22,26,22,19,24,26,13,22,21,7,17,25,25,19,23,22,21,18,22,18,23,20,15,21,18,19,22,16,18,20,24,24,18,21,17,22,16,21,24,24,16,16,18,20,24,17,19,20,15,22,23,16,19,19,21,24,22,18,24,24,22,23,22,20,18,25,16,20,15,19,19,16,17,28,25,20,16,23,21,23,18,20,9,25,20,21,22,27,18,16,22,20,20) > par3 = '20' > par2 = '0.95' > par1 = 'two.sided' > #'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: > par2 <- as.numeric(par2) > par3 <- as.numeric(par3) > (tt <- t.test(x,mu=par3,alternative=par1,conf.level=par2)) One Sample t-test data: x t = 0.7835, df = 97, p-value = 0.4352 alternative hypothesis: true mean is not equal to 20 95 percent confidence interval: 19.56199 21.00944 sample estimates: mean of x 20.28571 > > #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,'One Sample t-test',2,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'H0',header=TRUE) > a<-table.element(a,tt$null.value) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Alternative',header=TRUE) > a<-table.element(a,tt$alternative) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'CI',header=TRUE) > a<-table.element(a,par2) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Sample Mean',header=TRUE) > a<-table.element(a,mean(x)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'T-Test',header=TRUE) > a<-table.element(a,tt$statistic) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'DF',header=TRUE) > a<-table.element(a,tt$parameter) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'P-Value',header=TRUE) > a<-table.element(a,tt$p.value) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/17ggv1320404871.tab") > > > > proc.time() user system elapsed 0.214 0.020 0.228