2 + 2
[1] 4
Statistical analysis in the marvelous world of R
Book in development. Several sections not developed yet
The aim of this book is two-fold:
R in itself is not difficult to learn, but as with learning any new language (spoken or computer) the initial learning curve can be steep and somewhat daunting. It is not intended to cover everything (neither with R not with statistics) but simply to help you climb the initial learning curve (potentially faster) and provide you with the basic skills (and confidence!) needed to start your own journey with R and with specific analysis.
The book is provided as a multilingual book breaking that language barrier and potentially allow to facilitate the learn of R and its mainly english-speaking environment. We are always looking for volunteers to help developed the book further and add more languages to the growing list. Please contact us if you want to help
On the web version of the book, use in the navigation bar to switch from one language to another. After switching to your preferred language, you can of course also download the pdf and epub versions in this language if you want to using .
List of languages:
For the best experience we recommend that you read the web version of this book which you can find https://biostats-uottawa.github.io/Rway.
The web version includes a navbar at the top of the page where you can toggle the sidebars on and off , search through the book , change the page color and suggest revisions if you spot a typo or mistake . You can also download a pdf and epub versions of the book.
We use a few typographical conventions throughout this book.
R code and the resulting output are presented in code blocks in our book.
2 + 2
[1] 4
Functions in the text are shown with brackets at the end using code font, i.e. mean()
or sd()
etc.
Objects are shown using code font without the round brackets, i.e. obj1
, obj2
etc.
R packages in the text are shown using code font and followed by the π¦ icon, i.e. tidyverse
π¦.
A series of actions required to access menu commands in RStudio or VSCode are identified as File
-> New File
-> R Script
which translates to βclick on the File menu, then click on New File and then select R Scriptβ.
When we refer to IDE (Integrated Development Environment software) later in the text we mean either RStudio of VScode.
When we refer to .[Rq]md, we mean either R markdown (.Rmd) or Quarto (.qmd) documents and would generally talk of R markdown documents when referring to either .Rmd
or .qmd
files.
The manual tries to highlight some part of the text using the following boxes and icons.
Stuff for you to do
R code and explanations
warnings
important points
notes
Julien Martin is a Professor at the University of Ottawa working on Evolutionary Ecology and has discovered R with version 1.8.1 and teaches R since v2.4.0.
The first part of the book on using R started as a fork on github from the excellent An introduction to R book by Douglas, Roos, Mancini, Couto and Lusseau (Douglas 2023). It was forked on April 23rd, 2023 from Alexd106 github repository then modified and updated following my own needs and teaching perspective of R. The content was neither reviewed nor endorsed by any the previous developers.
Several parts in the book were based on previous lab manuals for biostatistics classes at uOttawa written by Martin, Findlay, Morin and Rundle.
Site that provided a lot of information for the book:
Photos, images and screenshots are from Julien Martin except when indicated in caption.
Cover image was generated via Nightcafe Ai Art generator. Favicon and hex sticker were created from the cover image.
several screenshot are currently by Alex Douglas and are being redone to abide by the previous statement
I share this work under the license License Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International.
If you teach R, feel free to use some or all of the content in this book to help support your own students. The only thing I ask is that you acknowledge the original source and authors. If you find this book useful or have any comments or suggestions I would love to hear from you (contact info).
Julien Martin. (2024). On the R-way to hell. A multilingual introduction to R book. Version: 0.6.0 (2024-10-30).DOI: 10.5281/zenodo.13801263
Chapter | ||
---|---|---|
Using R | ||
1.-4. | β β | π |
5. Programming | β β | |
6. Reproducible reports | βοΈ | β β |
7. Version control | β β | |
Stats fundamentals | ||
all chapters | β β | π |
Linear models | ||
all chapters | β β | π |
Generalized linear models | ||
all chapters | βοΈ | β β |
Mixed models | ||
all chapters | β β | |
Generalized additive models | ||
all chapters | βοΈ | |
Multivariate analysis | ||
all chapters | βοΈ | |
Bayesian approach | ||
all chapters | β β | |
Suggested βοΈ ; mandatory β β ; expected knowledge (might need a refresher) π |