Computes a confidence interval for the mean of the variable (parameter or feature of the process), and prints the data, a histogram with a density line, the result of the ShapiroWilks normality test and a quantilequantile plot.
1 2 3 4 
x 
A numeric vector with the variable data 
sigma2 
The population variance, if known 
alpha 
The eqn\alpha error used to compute the 100*(1\α)\% confidence interval 
data 
The data frame containing the vector 
xname 
The name of the variable to be shown in the graph 
approx.z 
If TRUE it uses z statistic instead of t when sigma is unknown and sample size is greater than 30. The default is FALSE, change only if you want to compare with results obtained with the oldfashioned method mentioned in some books. 
main 
The main title for the graph 
digits 
Significant digits for output 
sub 
The subtitle for the graph (recommended: six sigma project name) 
ss.col 
A vector with colors 
When the population variance is known, or the size is greater than 30,
it uses z statistic. Otherwise, it is uses t statistic.
If the sample size is lower than 30, a warning is displayed so as to
verify normality.
The confidence Interval.
A graph with the figures, the ShapiroWilks test, and a histogram.
Thanks to the kind comments and suggestions from the anonymous reviewer of a tentative article.
EL Cano
Cano, Emilio L., Moguerza, Javier M. and Redchuk, Andres. 2012. Six Sigma with R. Statistical Engineering for Process Improvement, Use R!, vol. 36. Springer, New York. http://www.springer.com/statistics/book/9781461436515.
ss.data.rr
1 2 3  ss.ci(len, data=ss.data.strings, alpha = 0.05,
sub = "Guitar Strings Test  String Length",
xname = "Length")

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.