Loading...

Loading...

CIA 3 - R- PROGRAMMING SUBMITTED TO - PROF VANDANA BHAGAT

NAME - YUVIKA SAXENA

REGISTERATION NUMBER - 22111150

CLASS - 1BCOMB

*DATA SET CHOOSEN*

*TYPE OF DATA SET MT-CARS*MT- CARS data is basically motor trend car road tests. MT-CARS data set is a built-in dataset which contains measurements on 11 different attributes for 32 different cars in R-programming.

**CODE USED**

**t = mtcars**

**print(t)**

*TYPE OF DATA SET MT-CARS*MT- CARS data is basically motor trend car road tests. MT-CARS data set is a built-in dataset which contains measurements on 11 different attributes for 32 different cars in R-programming.

MT-CARS data set comes with the dplyr package in R- PROGRAMMING . As MT-CARS is a built in dataset so we can readily see the names of each variable at the top of each column.

*SCATTER PLOT GRAPH*A scatter plot graph shows a type of data visualization which shows the relationship between different kinds of variables. This data is shown by placing various data points between an x- and y-axis.

This graph shows a relationship between Mazada RX4 and mpg . This graph is partially scattered which means there is still a little bit of relationship between the two variables.

#SCATTERPLOTGRAPH

CODE USED

plot(x=mtcars$mpg,y=mtcars$mpg)#1 # positive relation

CODE USED

plot(x=mtcars$mpg,y=mtcars$mpg)#1 # positive relation

In this graph too the variables are partially scattered which shows there is a little relationship between the graphs.

#SCATTERPLOTGRAPH

CODE USED

plot(x=mtcars$mpg,y=mtcars$mpg)#2

CODE USED

plot(x=mtcars$mpg,y=mtcars$mpg)#2

#SCATTERPLOTGRAPH

CODE USED

plot(x=mtcars$mpg,y=mtcars$mpg)#1 # positive relation

CODE USED

plot(x=mtcars$mpg,y=mtcars$mpg)#1 # positive relation

*LINE GRAPH*A line graph is basically used to display change over time as a series of data points connected by straight line segments on two axes. The line graph in short helps us to determine the relationship between two sets of values, with one data set always being dependent upon the another

In this graph we are analysing the trend between the cars and cyl

#LINEGRAPH

CODE USED

plot(x=mtcars$cyl,y=mtcars$cyl,type = 'l' ) #1

points(x=mtcars$cyl,y=mtcars$cyl)

lines(x=mtcars$cyl,y=mtcars$cyl/2,col="red")

points(x=mtcars$cyl,y=mtcars$cyl/2,col="red")

#LINEGRAPH

CODE USED

plot(x=mtcars$cyl,y=mtcars$cyl,type = 'l' ) #1

points(x=mtcars$cyl,y=mtcars$cyl)

lines(x=mtcars$cyl,y=mtcars$cyl/2,col="red")

points(x=mtcars$cyl,y=mtcars$cyl/2,col="red")

In this graph there is a relationship between Mazada between cyl

#LINEGRAPH

CODE USED

plot(x=mtcars$cyl,y=mtcars$cyl,type = 'l' )#2

points(x=mtcars$cyl,y=mtcars$cyl)

lines(x=mtcars$cyl,y=mtcars$cyl/2,col="red")

points(x=mtcars$cyl,y=mtcars$cyl/2,col="red")

#LINEGRAPH

CODE USED

plot(x=mtcars$cyl,y=mtcars$cyl,type = 'l' )#2

points(x=mtcars$cyl,y=mtcars$cyl)

lines(x=mtcars$cyl,y=mtcars$cyl/2,col="red")

points(x=mtcars$cyl,y=mtcars$cyl/2,col="red")