Data Analytics and R Assignment I
Data Analytics and R Assignment I
Data Analytics and R Assignment I
ASSIGNMENT I
SUBMITTED TO:
MR. SUBHANKAR MISHRA
ASST. PROF
NIFT BHUBANESWAR
SUBMITTED BY:
VAISISTHA BAL
BFT/17/470
DEPT. OF FASHION TECHNOLOGY
NIFT BHUBANESWAR
• To calculate Mean:
0 | 33
0 | 679
1 | 1224
1|5
INTERPRETATION: Rug displays individual points on the graph, where the values are
more likely to occur.
• pie(table(v))
• Rainbow Chart
v <- 200
pie(rep(1, v), labels = "", col = rainbow(v),
border = NA,
main = "pie(*, labels=\"\", col=rainbow(v),
border=NA,..")
INFERENCE: # Line Plot shows the direct increase in the $circumference of the tree
trunk with increase their $age
# It can be visually observed that circumference maintains an approximately constant
increase.
• Scatter Plot
ggplot(Orange, aes(x=age, y=circumference)) +
geom_point(aes(col=Tree)) +
labs(subtitle="Age vs Circumference",
y="Circumference",
x="Age",
title="Scatterplot")
INFERENCE: This chart describes the average circumference per tree type in
increasing order. As we can see here, the graph shows that tree type 4 has the highest
average circumference.
• Box plot
ggplot(Orange2, aes(age, circumference))
boxp + geom_boxplot(varwidth=T, fill="plum") +
labs(title="Box plot",
subtitle="Circumference grouped by Age of the Tree",
x="Age group of the Tree",
y="Circumference of the Tree")
INFERENCE: the box plot describes the IQR of circumference for each age group.
Each of the lines on a box plot represents the median. The larger the box size, the
more different types of values are in it.
• Violin plot
vp <- ggplot(Orange, aes(Tree, circumference, color=Tree))
vp + geom_violin(trim=FALSE) +
geom_boxplot(width=0.1)
labs(title="Violin plot",
subtitle="Circumference vs Tree",
x="Type of Tree",
y="Circumference")
RESULT: