Tuesday, January 8, 2013

Intro to analyst through R project !!


What is R?

R is a language and environment for statistical computing and graphics. It is a GNU Project which is similar to the S language and environment which was developed at Bell Laboratories (formerly AT&T, now Lucent Technologies) by John Chambers and colleagues.

One of R's strengths is the ease with which well-designed publication-quality plots can be produced, including mathematical symbols and formula where needed. Great care has been taken over the defaults for the minor design choices in graphics, but the user retains full control.

For assignment we have used NSE 4 months data and stored it in a variable z.


Assignment 1: Plotting Histogram

Code
>x<-c(1,2,3)
>plot(x,type="h")

Histogram Plot


Assignment 2: Plotting point and line diagram 


Code:

>zcol3<-z[,3]
>plot(zcol3,type="b",main="NSE Data",xlab="Time",ylab="nifty")


Point and Line Plot:




Assignment 3: Scatter Diagram for High and Low data

Code:
zcol4<-z[,4]
plot(zcol3,zcol4,type="b",main="NSE Data",xlab="High",ylab="Low")

Scatter Diagram:



Assignment 4: Volatility of Max and Min of share value

Code:
>zcol3<-z[,3]
>zcol4<-z[,4]
mergeddata<-c(zcol3,zcol4)
> summary(mergeddata)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
   4888    5660    5723    5758    5884    6021
> range(mergeddata)
[1] 4888.20 6020.75



#disclaimer: This post is prepared as an assignment for R project , BA course, VGSoM, IIT Kharagpur Spring semester class of 2014.

No comments:

Post a Comment