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") Example: da=read.table("m-ibm2604.txt",header=T) if the first row of the data contains names for the variables. 5. Perform needed analysis. Commands will be given in class. You can also use the "help" command in R. Example: plot(sp,type='l') to obtain a time-series plot, where "sp" is the name of the time series to be shown. acf(sp,lag=12) to compute the first 12 lags of acf. pacf(sp,lag=12) 6. Type q() to exit R.