Analyzing A Built-In Dataset (MTCARS) Using Built-In R Functions

Опубликовано: 29 Апрель 2026
на канале: Joys of Data
3,818
35

Click "Show More" To See Code.

*Note YouTube does not allow assignment operators, therefore I have used an equal sign below. Please replace with assignment operator in your code.

data()
class(mtcars)
head(mtcars)
tail(mtcars)
summary(mtcars)

cyl = mtcars$cyl
hp = mtcars$hp

plot(density(cyl))

plot (cyl, hp, pch=17, main = "Title", xlab = "Cylinder", ylab ="Horse Power", col = "green")

x = lm(formula = hp~cyl, data=mtcars)
abline(x)

David Wilkinson explores the R package Quantmod for stock analysis. #R #Rfunctions #Rdatasets #mtcars #mtcars #dataframe #rfunctions #dataset #functions #joysofdata #davidwilkinson