Getting help and documentation

R’s own help system

Help system for R functions

Function Arguments

function (x, digits = 0) 
NULL

Application examples


round> round(.5 + -2:4) # IEEE / IEC rounding: -2  0  0  2  2  4  4
[1] -2  0  0  2  2  4  4

round> ## (this is *good* behaviour -- do *NOT* report it as bug !)
round> 
round> ( x1 <- seq(-2, 4, by = .5) )
 [1] -2.0 -1.5 -1.0 -0.5  0.0  0.5  1.0  1.5  2.0  2.5  3.0  3.5  4.0

round> round(x1) #-- IEEE / IEC rounding !
 [1] -2 -2 -1  0  0  0  1  2  2  2  3  4  4

round> x1[trunc(x1) != floor(x1)]
[1] -1.5 -0.5

round> x1[round(x1) != floor(x1 + .5)]
[1] -1.5  0.5  2.5

round> (non.int <- ceiling(x1) != floor(x1))
 [1] FALSE  TRUE FALSE  TRUE FALSE  TRUE FALSE  TRUE FALSE  TRUE FALSE  TRUE
[13] FALSE

round> x2 <- pi * 100^(-1:3)

round> round(x2, 3)
[1]       0.031       3.142     314.159   31415.927 3141592.654

round> signif(x2, 3)
[1] 3.14e-02 3.14e+00 3.14e+02 3.14e+04 3.14e+06

Getting help without knowing the function name

 [1] ".colMeans"     ".rowMeans"     "colMeans"      "kmeans"       
 [5] "mean"          "mean.Date"     "mean.default"  "mean.difftime"
 [9] "mean.POSIXct"  "mean.POSIXlt"  "rowMeans"      "weighted.mean"

Online documentation

Search, mailing lists and Q&A sites

Introductory websites and texts

Official documentation

Books

Introductory statistics

  • Dalgaard, P. (2008). Introductory Statistics with R (2nd ed.). London, UK: Springer. URL
  • Maindonald, J. & Braun, W. J. (2010). Data Analysis and Graphics Using R: An Example-Based Approach (3rd ed.). Cambridge, UK: Cambridge University Press. URL
  • Verzani. J. (2014). Using R for Introductory Statistics (2nd ed.). Boca Raton, FL: Chapman & Hall/CRC.
  • Wollschlaeger, D. (2020). Grundlagen der Datenanalyse mit R (5th ed.). Berlin: Springer. URL

Specialized and advanced statistical topics

  • Regressions models
    • Fox J, Weisberg S. 2019. An R Companion to Applied Regression (3rd ed). Thousand Oaks, CA: Sage. URL
    • Fox J. 2020. Regression diagnostics (2nd ed). URL
    • Harrell Jr FE. 2015. Regression Modeling Strategies (2nd ed). New York: Springer. URL
  • Multivariate analysis
    • Zelterman D. 2015. Applied multivariate statistics with R. New York, NY: Springer.
  • Linear mixed models
    • Galecki AT, Burzykowski T. 2013. Linear Mixed-Effects Models Using R: A Step-by-Step Approach. New York, NY: Springer.
    • Pinheiro JC, Bates, DM. 2000. Mixed-Effects Models in S and S-PLUS. New York, NY: Springer.
    • West BT, Welch, KB, Galecki AT. 2014. Linear mixed models: A practical guide using statistical software (2n ed). Boca Raton, FL: Chapman & Hall/CRC. URL
  • Resampling methods
    • Chihara L, Hesterberg T. 2018. Mathematical Statistics with Resampling and R (2nd ed). Hoboken, NJ: Wiley. URL
  • Time series
    • Shumway RH, Stoffer DS. 2016. Time series analysis and its applications (4th ed). New York, NY: Springer. URL
    • Shumway RH, Stoffer DS. 2019. Time Series: A Data Analysis Approach Using R. Boca Raton, FL: Chapman & Hall/CRC. URL
    • Hyndman RJ, Athanasopoulos G. 2019. Forecasting: Principles and practice (2nd ed). Melbourne, Australia: OTexts. URL
  • Bayes methods
    • Kruschke JK. 2015. Doing Bayesian data analysis: A tutorial with R, JAGS, and Stan (2nd ed). Amsterdam: Academic Press. URL
    • McElreath R. 2020. Statistical rethinking: A Bayesian course with examples in R and Stan (2nd ed). Boca Raton, FL: Chapman & Hall/CRC. URL
  • Spatial statistics
    • Bivand RS, Pebesma E, Gómez-Rubio V. 2013. Applied spatial data analysis with R (2nd ed). New York, NY: Springer. URL
  • R for data science and machine learning:
    • James G, Witten D, Hastie T, Tibshirani R. 2013. An introduction to statistical learning with applications in R. New York, NY: Springer. URL
    • Kuhn M, Johnson K. 2013. Applied predictive modeling. New York, NY: Springer. URL
    • Wickham H, Grolemund G. 2017. R for data science. Sebastopol, CA: O’Reilly. URL

Diagrams

  • Murrell, P. (2018). R Graphics (3rd ed.). Boca Raton, FL: Chapman & Hall/CRC. URL
  • Unwin, A. (2015). Graphical data analysis with R. Boca Raton, FL: Chapman & Hall/CRC. URL
  • Wickham, H; Sievert C. (2016). ggplot2: Elegant Graphics for Data Analysis. New York, NY: Springer. URL
  • Chang, W. (2018).R Graphics Cookbook (2nd ed). Sebastopol, CA: O’Reilly. URL
  • Wilke, C. O. (2019). Fundamentals of data visualization. Sebastopol, CA: O’Reilly. URL

Programming with R

  • Chambers JM. 2016. Extending R. Boca Raton, FL: Chapman & Hall/CRC.
  • Gillespie C, Lovelace R. 2017. Efficient R programming. Sebastopol, CA: O’Reilly. URL
  • Wickham H. 2019. Advanced R (2nd ed). Boca Raton, FL: Chapman & Hall/CRC. URL
  • Wickham H. 2015. R packages. Sebastopol, CA: O’Reilly. URL

Transition from other statistical software packages

  • Muenchen, R. A. (2011). R for SAS and SPSS Users (2nd ed.). New York, NY: Springer. URL
  • Muenchen, R. A. & Hilbe, J. M. (2010). R for Stata Users. New York, NY: Springer. URL

Dynamic documents and reproducible research

  • Xie Y. 2015. Dynamic documents with R and knitr (2nd ed). Boca Raton, FL: Chapman & Hall/CRC.
  • Xie Y, Dervieux C, Riederer E. 2020. R Markdown Cookbook. Boca Raton, FL: Chapman & Hall CRC. URL
  • Xie Y, Allaire JJ, Grolemund G. 2018. R markdown: The definitive guide. Boca Raton, FL: Chapman & Hall/CRC. URL
  • Gandrud, C. (2020). Reproducible research with R & RStudio (3rd ed). Boca Raton, FL: Chapman & Hall/CRC. URL
  • Stodden, V., Leisch, F. & Peng, R. D. (2014). Implementing Reproducible Research. Boca Raton, FL: Chapman & Hall/CRC.

Shiny for interactive Web-Apps

  • Sievert C. 2020. Interactive web-based data visualization with R, plotly, and shiny. Boca Raton, FL: Chapman & Hall/CRC. URL
  • Wickham H. 2020. Mastering shiny. Sebastopol, CA: O’Reilly. URL

Get the article source from GitHub

R markdown - markdown - R code - all posts