An Introduction to R for Quality Control

  • Chapter
  • First Online:
Quality Control with R

Part of the book series: Use R! ((USE R))

  • 4701 Accesses

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
EUR 32.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or Ebook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
EUR 29.95
Price includes VAT (Germany)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
EUR 71.68
Price includes VAT (Germany)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
EUR 90.94
Price includes VAT (Germany)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free ship** worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

Notes

  1. 1.

    http://www.r-project.org.

  2. 2.

    http://www.rstudio.com.

  3. 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. 4.

    http://www.qualitycontrolwithr.com.

  5. 5.

    http://www.rstudio.com.

  6. 6.

    http://www.ess.r-project.org.

  7. 7.

    http://www.walware.de/goto/statet.

  8. 8.

    Esca** means to provide a character string with special characters. For example, ∖n is for the special character new line.

  9. 9.

    http://www.java.com.

  10. 10.

    The version used while writing this book was 0.99.xxx.

  11. 11.

    It can be changed through the Tools > Global options menu.

  12. 12.

    This means that only the first letters of the argument name can be provided. We do not recommend that, though.

  13. 13.

    This function returns the structure of any R object.

  14. 14.

    Pressing the F1 key when the cursor is in a function name also works.

  15. 15.

    In this case not all the code is shown because seq is a built-in, compiled function.

  16. 16.

    The scan function also accepts arguments to scan data from files and text, check the function documentation.

  17. 17.

    Note that the output might have more elements if further objects were created beforehand.

  18. 18.

    The sum function will be explained later.

  19. 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. 20.

    We first fix the seed in order to make the example reproducible.

  21. 21.

    We use a different URL within the download.file function as it fails in redirecting URLs.

  22. 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. 23.

    http://www.iso.org/iso/home/store/catalogue_tc/catalogue_tc_browse.htm?commid=45342.

  24. 24.

    http://www.jtc1bigdatasg.nist.gov.

References

  1. Anhoej, J.: qicharts: quality improvement charts. http://www.CRAN.R-project.org/package=qicharts (2015). R package version 0.2.0

  2. Annau, M.: h5: interface to the ‘HDF5’ library. http://www.CRAN.R-project.org/package=h5 (2015). R package version 0.9

  3. 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

  4. 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

  5. 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

  6. Chambers, J.M.: Software for data analysis. In: Programming with R. Statistics and Computing. Springer, Berlin (2008)

    Book  MATH  Google Scholar 

  7. Chheng, T.: RMongo: MongoDB client for R. http://www.CRAN.R-project.org/package=RMongo (2013). R package version 0.0.25

  8. 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

    Google Scholar 

  9. 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

  10. Dodge, H., Romig, H.: Sampling Inspection Tables, Single and Double Sampling. Wiley, New York (1959)

    MATH  Google Scholar 

  11. Fellows, I.: Deducer: a data analysis gui for R. J. Stat. Softw. 49(8), 1–15 (2012). http://www.jstatsoft.org/v49/i08/

  12. 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

  13. 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

  14. Free Software Foundation, Inc.: Free Software Foundation website. http://www.gnu.org (2014) [Retrieved 2014-07-10]

  15. 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

  16. 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

  17. 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)

    Google Scholar 

  18. 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)

  19. ISO TC69/SCS–Secretariat: ISO 28640:2010 – Random Variate Generation Methods. Published Standard. http://www.iso.org/iso/catalogue_detail.htm?csnumber=42333 (2015)

  20. Kiermeier, A.: Visualizing and assessing acceptance sampling plans: the R package AcceptanceSampling. J. Stat. Softw. 26(6) (2008). http://www.jstatsoft.org/v26/i06/

  21. 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

  22. Mirai Solutions GmbH: XLConnect: excel connector for R. http://www.CRAN.R-project.org/package=XLConnect (2015). R package version 0.2-11

  23. 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

  24. Murrell, P.: R Graphics, 2nd edn. Chapman & HallCRC, Boca Raton (2011)

    MATH  Google Scholar 

  25. 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

  26. 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

  27. R Core Team: R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing, Vienna (2015). http://www.R-project.org/

  28. Ripley, B., Lapsley, M.: RODBC: ODBC database access. http://www.CRAN.R-project.org/package=RODBC (2015). R package version 1.3-12

  29. Roth, T.: qualityTools: statistics in quality science. http://www.r-qualitytools.org (2012). R package version 1.54 http://www.r-qualitytools.org

  30. RStudio Team: RStudio: Integrated Development Environment for R. RStudio Inc., Boston, MA (2012). http://www.rstudio.com/

  31. 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

  32. 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

  33. 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/

  34. Shewhart, W.: Economic Control of Quality in Manufactured Products. Van Nostrom, New York (1931)

    Google Scholar 

  35. 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

  36. Wickham, H.: ggplot2: elegant graphics for data analysis. In: Use R! Springer, Berlin (2009)

    Google Scholar 

  37. 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

  38. **e, Y.: Dynamic Documents with R and Knitr. Chapman and Hall/CRC, Boca Raton, FL (2013). http://www.yihui.name/knitr/. ISBN 978-1482203530

  39. **e, 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

  40. **e, Y.: knitr: a general-purpose package for dynamic report generation in R. http://www.yihui.name/knitr/ (2015). R package version 1.10.5

  41. 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/

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints 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

Publish with us

Policies and ethics

Navigation