R version 2.12.1 (2010-12-16)
Copyright (C) 2010 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(23,20,20,24,22,20,25,23,22,24,25,28,25,28,21,27,14,14,27,21,21,12,28,22,27,26,22,24,22,21,23,28,10,21,21,24,25,23,21,17,25,23,28,19,26,18,18,21,22,27,22,28,26,10,22,21,24,25,20,23,24,24,20,20,27,23,26,23,17,21,25,27,24,27,21,24,21,15,25,22,24,23,23,22,22,24,24,25,26,21,26,28,18,20,25,22,21,18)
> par2 = '20'
> par1 = '0.98'
> par1 <- as.numeric(par1)
> par2 <- as.numeric(par2)
> len <- length(x)
> df <- len - 1
> sd <- sd(x)
> mx <- mean(x)
> 
> #Note: the /var/www/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/www/rcomp/createtable")
> 
> delta2 <- abs(qt((1-par1)/2,df)) * sd / sqrt(len)
> delta1 <- abs(qt((1-par1),df)) * sd / sqrt(len)
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a,'Hypothesis Test about the Mean - Confidence Interval',2,TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a,'Sample size',header=TRUE)
> a<-table.element(a,len)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a,'Sample standard deviation',header=TRUE)
> a<-table.element(a,sd)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a,'Confidence',header=TRUE)
> a<-table.element(a,par1)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a,'Null hypothesis',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,mx)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a,'2-sided Confidence Interval',header=TRUE)
> dum <- paste('[',mx-delta2)
> dum <- paste(dum,',')
> dum <- paste(dum,mx+delta2)
> dum <- paste(dum,']')
> a<-table.element(a,dum)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a,'Left-sided Confidence Interval',header=TRUE)
> dum <- paste('[',mx-delta1)
> dum <- paste(dum,', +inf ]')
> a<-table.element(a,dum)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a,'Right-sided Confidence Interval',header=TRUE)
> dum <- paste('[ -inf, ',mx+delta1)
> dum <- paste(dum,']')
> a<-table.element(a,dum)
> a<-table.row.end(a)
> a<-table.end(a)
> table.save(a,file="/var/www/rcomp/tmp/1cc6r1319576698.tab") 
> 
> 
> 
> proc.time()
   user  system elapsed 
  0.276   0.044   0.305