Introduction to R
Abstract
1
Getting started
1.1
How to read this book
1.2
RStudio IDE
1.3
Alternatives to RStudio
1.4
The R workspace
1.5
Literate programming
1.6
Documentation
2
Data variables (objects) in R
2.1
Declaring variables
2.2
Best practise and variable naming conventions
2.3
Data types
2.3.1
Numeric and Integer
2.3.2
Character
2.3.3
Logical
2.4
Determining data type
2.4.1
Typecasting
2.5
Functions
2.5.1
Nesting functions
2.6
Data structures
2.6.1
Vectors
2.6.2
Lists
2.6.3
Changing Vectors and Lists
2.6.4
Factors
2.6.5
Matrices
2.6.6
Data frame
2.7
Finding, describing and removing objects
3
File and data input/output (IO)
3.1
Saving variable data
3.2
Loading variable data
3.3
Current working directory
3.3.1
File paths
3.4
Importing from text files
3.5
Writing to text file
3.6
Other IO operations
3.6.1
Interactive input
3.6.2
Reading from a web connection
4
Simple data analysis
4.1
Simple Data cleaning
4.2
Summary statistics
4.2.1
Two-dimensional datasets
4.3
Vectorisation
5
Packages and functions
5.1
Extending R with packages
5.2
User defined functions
5.3
Tips for functions
6
More data analysis
6.1
apply()
6.2
For and while loops
6.2.1
For loops
6.2.2
While loop
7
Visualising data
7.1
Boxplots
7.2
Histograms
7.3
Density plots
7.4
Scatterplots
7.4.1
Scatterplot matrix
7.5
Bar charts
Appendix 1
Summary of Object Types
More information on R and Bioconductor for Genomics
Going further with R
Vignettes
Citations
SessionInfo
Other ways of running R
Published with bookdown
Introduction to R
Chapter 5
Packages and functions