This handout demonstrates using R. 1. Click R icon to start 2. Use the command "Library" to download packages. Example: library(fSeries) (You may also click on "Packages" to select a package.) 3. Set your working directory (the directory in which you store the data file) using the command "setwd". Example: setwd("C:/teaching/bs41202") 4. Use the command "read.table" to load the data. Example: da=read.table("m-ibm2604.txt") 5. You may perform analysis. 6. The followings are basic operations in R (a) addition: s=a+b (b) subtration: d=a-b (c) multipication: p = a*b (d) division: d = a/b (e) power: c = a^b (f) natural log: c = log(a) (g) square-root: c = a^0.5 (or c = sqrt(a)) 7. Type q() to exit R.