data(mtcars)
mtcars # First rows of the dataset head(mtcars)
tail(mtcars)
str(mtcars)
summary(mtcars)
dim(mtcars)
names(mtcars)
mtcars$mpg
mean(mtcars$mpg)
table(mtcars$cyl)
hist(mtcars$mpg, main = “Histogram of MPG”, xlab = “MPG”)
boxplot(mtcars$mpg, main = “Boxplot of MPG”)
plot(mtcars\(wt, mtcars\)mpg, main = “MPG vs Weight”, xlab = “Weight”, ylab = “MPG”)
This activity helped me explore and better understand a real dataset using R. By examining the structure, summary statistics, and visualizations, I was able to see how data exploration helps identify patterns and relationships between variables. These steps are essential before applying more advanced data analysis or machine learning techniques.