MEDS5420 - Introduction to R
March 27, 2023
Contents
1
Today: Using R to manipulate, parse, and perform statistics on data frames
1.1
What is R?
2
Downloading and installing R-base and R-packages:
2.1
R
resources
2.2
R packages
2.3
Intro to R sessions
3
Data Types:
3.1
Data structures:
3.2
Lists and Vectors
3.3
Matrices and DataFrames
4
Accessing elements of matrixes and data frames:
4.1
Loading your own data frames:
4.2
Working with data:
4.3
data.tables
4.4
Converting table formats between ‘wide’ and ‘long’
5
Managing data and saving your environment workspace
6
Writing tables to text file:
7
Reading text files fast as
data.tables
with
fread
:
7.1
writing
data.tables
:
8
Rscript
to run
R
code
9
For Next Time:
10
In Class Exercises:
11
Answers to In Class Exercises:
Figure 1:
ChIP-seq schematic