#Project-1—–
data<-seeds
new_data<-seeds
data
dim(data)
[1] 199 8
names(data)
[1] "Area" "Perimeter" "Compactness" "Kernel.Length"
[5] "Kernel.Width" "Asymmetry.Coeff" "Kernel.Groove" "Type"
class(data)
[1] "spec_tbl_df" "tbl_df" "tbl" "data.frame"
data$Type
[1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
[42] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
[83] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
[124] 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
[165] 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
new_data$Type<-as.factor(new_data$Type)
data<-data[,-8]
data
plot(data$Area,data$Perimeter, xlab="Area", ylab="Perimeter", main=" Scatter plot",col.main = 'blue',
col.axis = 'red',
col.lab = 'cyan',)
hist(data$Perimeter,xlab="Perimeter", ylab="Frequency", main=" Histogram of Perimeter",col.main = 'blue',
col.axis = 'red',
col.lab = "yellow",)
boxplot(data$Perimeter,xlab="Perimeter", ylab="Frequency", main=" Boxplot of Perimeter",col.main = 'blue',
col.axis = 'red',
col.lab = 'green')
#6--
library(ggplot2)
ggplot(data, aes(x=data$Area,y=data$Perimeter))+
geom_point()+
geom_smooth()+
theme_bw()+
labs(title = "Area Vs Perimeter",
x = "Area",
y = "Perimeter")
ggplot(data, aes(x=data$Perimeter))+
geom_histogram()+
labs(title = " Perimeter",
x = "Area",
y = "Freuency")
ggplot(new_data, aes(x=new_data$Type,y=new_data$Kernel.Length, fill=Type))+
geom_boxplot()+
labs(title = " Kernel length",
x = "type",
y = "Kernel length")