Friday, March 29, 2013

IT and Business Applications Lab : Session 10

Assignment 1 :

Create 3 vectors x,y,z and choose any random values for them.

Use the function cbind () on x,y,z.

Create 3-dimensional plot of the same.






 plot3d (T)



plot3d (T,col=rainbow(1000))


plot3d (T,col=rainbow(1000),type='s')


Assignment 2 :


Create 2 random variables 

Create 3 plots.

1. X-Y 

2. X-Y|Z (introducing a variable z and cbind it to z and y with 5 diff categories) 

3. Color code and draw the graph 

4. Smooth and best fit line for the curve

qplot (x,y)

qplot (x,z)

qplot (x,z,alpha=I(1/10))

qplot (x,y,geom=c("point","smooth"))

qplot (x,y,colour=z)

qplot (log(x),log(y),colour=z)


No comments:

Post a Comment