Creating Scatter Plot in R - HKBUPhonLab.Ep.48

Опубликовано: 07 Август 2026
на канале: HKBU Phonology Laboratory
37
0

HKBU Phonology Lab
http://arts.hkbu.edu.hk/phonlab/index...

Sample r code:

data1 = read.csv(file.choose(), header = TRUE, sep=",")
head(data1)

plot(data1$Quiz, data1$Test)

plot(data1$Quiz, data1$Test,
xlab = “Quiz”,
ylab = “Test”,
main = “Correlation of Quiz and Test”)

plot(data1$Quiz, data1$Test,
xlab = "Quiz",
ylab = "Test",
main = "Correlation of Quiz and Test",
abline(lm(data1$Test ~ data1$Quiz)))

plot(data1$Quiz, data1$Test,
xlab = "Quiz",
ylab = "Test",
main = "Correlation of Quiz and Test",
abline(lm(data1$Test ~ data1$Quiz),
col = "red", lwd = 3))

Thanks to the HKBU Faculty of Arts for the support in the video making.
Lab director: Mingxing Li
Technical assistant: Vesper Liu
Director and camera: Kennix Chow
Copy editing: Tsui Ying Ho