Imperial College/Courses/Fall2008/Synthetic Biology (MRes class)/'R' Tutorial/Basic Commands

From OpenWetWare

Jump to: navigation, search
Fall 2008 - Synthetic Biology (MRes class)

Home        'R' Tutorial        Resources        Literature

blog stats

Introduction to 'R'



Running 'R' programs

  • From windowing system
    • From a file
      • source("my_program.txt")
  • From command line
    • R

Getting help with functions and features

  • 'R' has an inbuilt help facility. If the function/feature name is toto, you can find help by typing either:
    • help(toto)
    •  ?toto
  • Remember, 'R' is case sensitive.

Data types

  • Vectors
  • Lists
  • Factors
  • Matrices
  • Data Frames

Basic inputs/outputs

  • read.table(filename, HEADER=TRUE)
  • read.cvs(filename)

Basic plotting

  • plot()
  • hist()
  • boxplot()
  • par()
  • mtext()
  • title()
  • curve()
  • abline()

Writing your own functions

Regression analysis

  • lm()

ODE solver

  • lsoda()
Personal tools