# Load the built-in Iris dataset
data(iris)
head(iris)
# See the structure of the dataset
str(iris)
summary(iris)
colnames(iris)
# Scatterplot of Sepal length vs. Sepal width
plot(iris$Sepal.Length, iris$Sepal.Width,
xlab = "Sepal Length", ylab = "Sepal Width",
main = "Sepal Length vs. Sepal Width",
col = iris$Species)
# Boxplot of Sepal Length by Species
boxplot(Sepal.Length ~ Species, data = iris,
main = "Sepal Length by Species",
xlab = "Species", ylab = "Sepal Length (cm)")
# ANOVA to compare Sepal Length across Species
anova_result <- aov(Sepal.Length ~ Species, data = iris)
summary(anova_result)
# Correlation matrix for numeric columns
cor_matrix <- cor(iris[, 1:4]) # Exclude the Species column
print(cor_matrix)
# Visualizing the correlation matrix with a heatmap
#heatmap(cor_matrix, main = "Correlation Matrix of Iris Features")
To embed this project on your website, copy the following code and paste it into your website's HTML: