# The overnight MIBOR rates were stored in a file name “Call_Rates_2011.csv”, this is just a normal Excel file saved in a CSV(comma separated delimited) format that R can read.
# The way in which R conceptualizes the data is similar to that in Excel, to draw a simple analogy you can assume that the variable “a” now stores the entire Excel spreed sheet in it.
# You will have to make sure that the working directory is the one that contains the file “Call_Rates_2011.csv”
a <- read.csv(“Call_Rates_2011.csv”)
# The 2 column headers in my CSV file were “date” and “mibor”, so the below code plots “date” on the x-axis and “mibor” on the y-axis. The as.Date() tells R that the column “date” contains dates in the format “day-month-year”(‘%d-%b-%y’).
# a$(column header) is the standard way of referring to a column in the “spreadsheet” contained in “a”
# xlab : x-axis label
# ylab : y- axis label
# type : line(l)
# col : color of the line
plot(as.Date(a$date,’%d-%b-%y’), a$mibor, xlab= “Months”, ylab= “MIBOR overnight rates(percentage)”, type=’l’, col=’red’)
# This is to get the titles in place
# main : main title
# col.main : color of the main title
#font.main : font size of the title
title(main=”Overnight MIBOR rates for last one year”, col.main=”black”, font.main=4)
And the plot hence obtained thus looks like:
Incase you can’t make out the difference in the quality of the plot obtained just drop in your comments and email address and I will mail you the pdf and the jpg image of the plot. You can pull/stretch it to see that the pixels don’t get distorted and it looks way neater if you present it in your slide in a presentation.