Abstract
This chapter introduces R as statistical software and programming language for quality control. The chapter is organized as a kind of tutorial with lots of examples ready to be run by the reader. Moreover, the code is available at the book’s companion website. Even though the RStudio interface is also introduced in the chapter, any other user interface can be used, including the R default GUI and code editor.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
- 2.
- 3.
Please note that sometimes what you paste could not be exactly what you see in the book and some modifications could be needed.
- 4.
- 5.
- 6.
- 7.
- 8.
Escaping means to provide a character string with special characters. For example, ∖n is for the special character new line.
- 9.
- 10.
The version used while writing this book was 0.99.xxx.
- 11.
It can be changed through the Tools > Global options menu.
- 12.
This means that only the first letters of the argument name can be provided. We do not recommend that, though.
- 13.
This function returns the structure of any R object.
- 14.
Pressing the F1 key when the cursor is in a function name also works.
- 15.
In this case not all the code is shown because seq is a built-in, compiled function.
- 16.
The scan function also accepts arguments to scan data from files and text, check the function documentation.
- 17.
Note that the output might have more elements if further objects were created beforehand.
- 18.
The sum function will be explained later.
- 19.
We use the paste function to get a sequence of character strings, see Appendix C to see more functions to work with strings.
- 20.
We first fix the seed in order to make the example reproducible.
- 21.
We use a different URL within the download.file function as it fails in redirecting URLs.
- 22.
There are more packages able to deal with Excel files, check http://www.thertrader.com/2014/02/11/a-million-ways-to-connect-r-and-excel/.
- 23.
- 24.
References
Anhoej, J.: qicharts: quality improvement charts. http://www.CRAN.R-project.org/package=qicharts (2015). R package version 0.2.0
Annau, M.: h5: interface to the ‘HDF5’ library. http://www.CRAN.R-project.org/package=h5 (2015). R package version 0.9
Barbosa, E.P., Barros, F.M.M., de Jesus Goncalves, E., Recchia, D.R.: IQCC: improved quality control charts. http://www.CRAN.R-project.org/package=IQCC (2014). R package version 0.6
Block, U.: Using an algorithm by Hatto von Hatzfeld: ISOweek: week of the year and weekday according to ISO 8601. http://www.CRAN.R-project.org/package=ISOweek (2011). R package version 0.6-2
Cano, E.L., Moguerza, J.M., Redchuk, A.: Six sigma with R. In: Statistical Engineering for Process Improvement, Use R!, vol. 36. Springer, New York (2012). http://www.springer.com/statistics/book/978-1-4614-3651-5
Chambers, J.M.: Software for data analysis. In: Programming with R. Statistics and Computing. Springer, Berlin (2008)
Chheng, T.: RMongo: MongoDB client for R. http://www.CRAN.R-project.org/package=RMongo (2013). R package version 0.0.25
Ciupke, K.: Multivariate process capability vector based on one-sided model. Qual. Reliab. Eng. Int. (2014). doi:10.1002/qre.1590. R package version 1.1
Conway, J., Eddelbuettel, D., Nishiyama, T., Prayaga, S.K., Tiffin, N.: RPostgreSQL: R interface to the PostgreSQL database system. http://www.CRAN.R-project.org/package=RPostgreSQL (2013). R package version 0.4
Dodge, H., Romig, H.: Sampling Inspection Tables, Single and Double Sampling. Wiley, New York (1959)
Fellows, I.: Deducer: a data analysis gui for R. J. Stat. Softw. 49(8), 1–15 (2012). http://www.jstatsoft.org/v49/i08/
Flores, M., Naya, S., Fernandez, R.: qcr: quality control and reliability. http://www.CRAN.R-project.org/package=qcr (2014). R package version 0.1-18
Fox, J.: The R commander: a basic statistics graphical user interface to R. J. Stat. Softw. 14(9), 1–42 (2005). http://www.jstatsoft.org/v14/i09
Free Software Foundation, Inc.: Free Software Foundation website. http://www.gnu.org (2014) [Retrieved 2014-07-10]
Godfrey, A.J.R., Govindaraju, K.: Dodge: functions for acceptance sampling ideas originated by H.F. Dodge. http://www.CRAN.R-project.org/package=Dodge (2013). R package version 0.8
ISO/IEC JTC 1 – Information Technology: ISO/IEC 12207:2008, Systems and Software Engineering – Software Life Cycle Processes. ISO – International Organization for Standardization (2008). http://www.iso.org/iso/catalogue_detail?csnumber=43447
ISO TC154 – Processes, Data Elements and Documents in Commerce, Industry and Administration: ISO 8601 Data Elements and Interchange Formats – Information Interchange – Representation of Dates and Times. ISO – International Organization for Standardization (2004)
ISO TC69/SCS–Secretariat: ISO 16269-4:2010 – Statistical Interpretation of Data – Part 4: Detection and Treatment of Outliers. Published Standard. http://www.iso.org/iso/catalogue_detail.htm?csnumber=44396 (2010)
ISO TC69/SCS–Secretariat: ISO 28640:2010 – Random Variate Generation Methods. Published Standard. http://www.iso.org/iso/catalogue_detail.htm?csnumber=42333 (2015)
Kiermeier, A.: Visualizing and assessing acceptance sampling plans: the R package AcceptanceSampling. J. Stat. Softw. 26(6) (2008). http://www.jstatsoft.org/v26/i06/
Lang, D.T., The CRAN Team: XML: tools for parsing and generating XML within R and S-plus. http://www.CRAN.R-project.org/package=XML (2015). R package version 3.98-1.3
Mirai Solutions GmbH: XLConnect: excel connector for R. http://www.CRAN.R-project.org/package=XLConnect (2015). R package version 0.2-11
Mukhin, D., James, D.A., Luciani, J.: ROracle: OCI based oracle database interface for R. http://www.CRAN.R-project.org/package=ROracle (2014). R package version 1.1.12
Murrell, P.: R Graphics, 2nd edn. Chapman & HallCRC, Boca Raton (2011)
Ooms, J., James, D., DebRoy, S., Wickham, H., Horner, J.: RMySQL: database interface and MySQL driver for R. http://www.CRAN.R-project.org/package=RMySQL (2015). R package version 0.10.1
R Core Team: Foreign: read data stored by minitab, S, SAS, SPSS, Stata, Systat, Weka, dBase, …. http://www.CRAN.R-project.org/package=foreign (2015). R package version 0.8-64
R Core Team: R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing, Vienna (2015). http://www.R-project.org/
Ripley, B., Lapsley, M.: RODBC: ODBC database access. http://www.CRAN.R-project.org/package=RODBC (2015). R package version 1.3-12
Roth, T.: qualityTools: statistics in quality science. http://www.r-qualitytools.org (2012). R package version 1.54 http://www.r-qualitytools.org
RStudio Team: RStudio: Integrated Development Environment for R. RStudio Inc., Boston, MA (2012). http://www.rstudio.com/
Santos-Fernández, E.: Multivariate Statistical Quality Control Using R, vol. 14. Springer, Berlin (2013). http://www.springer.com/statistics/computational+statistics/book/978-1-4614-5452-6
Sarkar, D.: Lattice: Multivariate Data Visualization with R. Springer, New York (2008). http://www.lmdvr.r-forge.r-project.org. ISBN 978-0-387-75968-5
Scrucca, L.: qcc: an r package for quality control charting and statistical process control. R News 4/1, 11–17 (2004). http://www.CRAN.R-project.org/doc/Rnews/
Shewhart, W.: Economic Control of Quality in Manufactured Products. Van Nostrom, New York (1931)
Urbanek, S.: RJDBC: provides access to databases through the JDBC interface. http://www.CRAN.R-project.org/package=RJDBC (2014). R package version 0.2-5
Wickham, H.: ggplot2: elegant graphics for data analysis. In: Use R! Springer, Berlin (2009)
Wickham, H., James, D.A., Falcon, S.: RSQLite: SQLite interface for R. http://www.CRAN.R-project.org/package=RSQLite (2014). R package version 1.0.0
Xie, Y.: Dynamic Documents with R and Knitr. Chapman and Hall/CRC, Boca Raton, FL (2013). http://www.yihui.name/knitr/. ISBN 978-1482203530
Xie, Y.: knitr: a comprehensive tool for reproducible research in R. In: Stodden, V., Leisch, F., Peng, R.D. (eds.) Implementing Reproducible Computational Research. Chapman and Hall/CRC, Boca Raton (2014). http://www.crcpress.com/product/isbn/9781466561595. ISBN 978-1466561595
Xie, Y.: knitr: a general-purpose package for dynamic report generation in R. http://www.yihui.name/knitr/ (2015). R package version 1.10.5
Young, D.S.: tolerance: an R package for estimating tolerance intervals. J. Stat. Softw. 36(5), 1–39 (2010). http://www.jstatsoft.org/v36/i05/
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2015 Springer International Publishing Switzerland
About this chapter
Cite this chapter
Cano, E.L., Moguerza, J.M., Corcoba, M.P. (2015). An Introduction to R for Quality Control. In: Quality Control with R. Use R!. Springer, Cham. https://doi.org/10.1007/978-3-319-24046-6_2
Download citation
DOI: https://doi.org/10.1007/978-3-319-24046-6_2
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-24044-2
Online ISBN: 978-3-319-24046-6
eBook Packages: Mathematics and StatisticsMathematics and Statistics (R0)