R version 2.15.2 (2012-10-26) -- "Trick or Treat" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i686-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(1,1,1,0,1,1,1,1,1,1,0,1,1,1,0,1,1,1,1,0,1,1,0,0,1,0,1,0,0,1,0,1,0,0,0,1,1) > par3 = '0' > par2 = '0.95' > par1 = 'two.sided' > par3 <- '0' > 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 = 8.1524, df = 36, p-value = 1.077e-09 alternative hypothesis: true mean is not equal to 0 95 percent confidence interval: 0.4872825 0.8100148 sample estimates: mean of x 0.6486486 > > #Note: the /var/fisher/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/fisher/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/fisher/rcomp/tmp/1hkmh1352562194.tab") > > > > proc.time() user system elapsed 0.259 0.063 0.304