Tuesday, January 8, 2013

Business Applications Lab


Business Applications Lab on R.


R is a language and environment for statistical computing and graphics. R provides a wide variety of statistical (linear and nonlinear modelling, classical statistical tests, time-series analysis, classification, clustering) and graphical techniques, and is highly extensible. 

Assignment 1 - Generic function for plotting of R objects


Q1. Plot selected columns from a set of data in the form of a histogram

Command: 
> plot(zcol1,type="h")

Q2:  Plot both the lines and points in the same graph

Command: 
> plot(zcol1,type="b")

Q3. Plot a scatter plot with line and point representation for NSE Index over a period of three months starting from October 2012.

Command:
> plot(zcollH,zcollL,type="b",main="NSE Graph",xlab="Time",ylab="High Value")


Q4. Find Volatility in NSE Index data.

Command: 
mergeddata<-c div="div" zcoll="zcoll" zcolll="zcolll">
> summary(mergeddata)
> range(mergeddata)
Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
   4888    5660    5723    5758    5884    6021
> range(mergeddata)
[1] 4888.20 6020.75