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,1,1,1,1,0,1,1,1,1,0,1,1,1,0,1,1,1,1,0,0,1,1,1,0,0,1,1,0,1,1) > par3 = '0' > par2 = '0.95' > par1 = 'greater' > par3 <- '0' > par2 <- '0.95' > par1 <- 'greater' > #'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 = 10, df = 32, p-value = 1.134e-11 alternative hypothesis: true mean is greater than 0 95 percent confidence interval: 0.6292509 Inf sample estimates: mean of x 0.7575758 > > #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/106191355666364.tab") > > > > proc.time() user system elapsed 0.298 0.081 0.357