QCBS R Workshop Series
Preface
0.1
Code of conduct
0.1.1
Expected behaviour
0.1.2
Unacceptable behaviour
0.2
Contributors
0.3
Contributing
Introduction to
R
1
Learning objectives
2
Preparing for the workshop
3
Recognizing and using R and RStudio
3.1
What is R?
3.2
Why use R?
3.3
Using RStudio
3.3.1
CHALLENGE 1
3.3.2
The RStudio interface
3.3.3
The RStudio Console
3.4
Errors and Warnings
3.4.1
Warning messages
3.4.2
Error messages
4
Using R as a calculator
4.1
Arithmetic Operators
4.1.1
CHALLENGE 2
4.1.2
CHALLENGE 3
4.1.3
CHALLENGE 4
5
Manipulating objects in R
5.1
Objects
5.2
Good practices in R code
5.2.1
CHALLENGE 5
5.2.2
CHALLENGE 6
5.2.3
The RStudio Environment
5.3
Data types and structure
5.3.1
Core data types in R
5.3.2
Data structure in R: scalars
5.3.3
Data structure in R: vectors
5.3.4
CHALLENGE 7
5.3.5
Operations using vectors
5.3.6
Data structure in R: matrices
5.3.7
CHALLENGE 8
5.3.8
Data structure in R: data frames
5.4
Indexing
5.4.1
CHALLENGE 9
5.4.2
Indexing a data frame
5.4.3
A quick note on logical statements
5.4.4
Indexing with logical vectors
5.4.5
CHALLENGE 10
5.4.6
CHALLENGE 11
6
Functions
6.1
Introduction
6.1.1
CHALLENGE 11
6.2
Arguments
6.2.1
CHALLENGE 12
7
Installing and using R packages
7.1
Packages
7.2
Getting help
7.2.1
Getting help with functions
7.2.2
Help page of functions
7.2.3
CHALLENGE 13
7.3
Getting help on the Web
7.3.1
CHALLENGE 14
Final considerations
8
Summary
9
Additional resources
9.1
Cheat Sheets
9.2
Books
9.3
Useful links
10
References
QCBS R Workshop Series
Workshop 1: Introduction to
R
Chapter 10
References