Data analysis and visualization with R

Key Points

A brief introduction to R
  • R is a strong statistical computing environment

  • Thousands of packages for R

  • Use variable <- value to assign a value to a variable in order to record it in memory.

  • Objects are created on demand whenever a value is assigned to them.

  • Use read.table and write.table to import / export data.

  • The function str describes the data frame.

  • Use object[x, y] to select a single element from a data frame.

  • Use from:to to specify a sequence that includes the indices from from to to.

  • All the indexing and slicing that works on data frames also works on vectors.

  • Use # to add comments to programs.

  • Use mean, max, min and sd to calculate simple statistics.

  • Use tapply to calculate statistics across the groups in a data frame.

  • Use ggplot to create both simple and advanced visualizations.

Explore a gene expression data set
  • Use vignettes to get introduced to a new package.

  • Gene expression analysis edgeR can be quite straight-forward.

Dynamic Reports with knitr
  • Use knitr to generate reports that combine text, code, and results.

  • Use Markdown to format text.

  • Put code in blocks delimited by triple back quotes followed by {r}.

Glossary

The glossary would go here, formatted as:

key word 1
:   explanation 1

key word 2
:   explanation 2

which renders as:

key word 1
explanation 1
key word 2
explanation 2