-
Notifications
You must be signed in to change notification settings - Fork 0
/
day 10.R
58 lines (38 loc) · 1.27 KB
/
day 10.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
library(RColorBrewer)
library(readr)
df <- read_csv("Brewery_data.csv")
View(df)
print(colnames(df))
#par(mar = c(1, 1, 1, 1))
plant_cost <- df$PLANT_COST
hist(plant_cost)
frame_df <- df[df$YEARS == 2019 & df$COUNTRIES == "Ghana", ]
View(frame_df)
plot(frame_df$PROFIT, type="l")
hist(df$PLANT_COST, breaks = 5, col=brewer.pal(4, "Set3"),
main="Histogram showing plant cost")
plot(frame_df$UNIT_PRICE, type = "l",
main='Profit against month')
barplot(frame_df$UNIT_PRICE, col=brewer.pal(3, "Set1"))
boxplot(frame_df$UNIT_PRICE~frame_df$MONTHS, col="red")
plot(x=frame_df$UNIT_PRICE, y=frame_df$PROFIT, col="red")
#plot(frame_df)
barplot(table(frame_df$BRANDS))
pie(table(frame_df$BRANDS))
heatmap(as.matrix(frame_df))
df_val <- data.frame(frame_df$UNIT_PRICE, frame_df$PROFIT)
heatmap(as.matrix(df_val))
View(iris)
class(iris)
library(magrittr)
#library(leaflet)
install.packages(c("rgl", "car"))
library("car")
#data("iris")
a <- iris$Sepal.Length
b <- iris$Petal.Length
c <- iris$Petal.Width
scatter3d(x = a, y = b, z = c)
scatter3d(x = frame_df$UNIT_PRICE, y =frame_df$PROFIT ,
z = frame_df$QUANTITY)
http://www.sthda.com/english/wiki/amazing-interactive-3d-scatter-plots-r-software-and-data-visualization