(r setup, include=FALSE)
knitr::opts_chunk$set(echo = TRUE)
# Vector
Cara membuat data dalam bentuk vektor.
#create sample data
X <- c(15, 17, 19, 20, 22, 38, 25, 50)
Y <- c(150, 200, 235, 220, 267, 300, 310, 400)
#print sample
X
## [1] 15 17 19 20 22 38 25 50
Y
## [1] 150 200 235 220 267 300 310 400
Y = a + bx
plot(Y - X, ylab="Y" , PCH=20)
## Warning in plot.window(...): "PCH" is not a graphical parameter
## Warning in plot.xy(xy, type, ...): "PCH" is not a graphical parameter
## Warning in axis(side = side, at = at, labels = labels, ...): "PCH" is not a
## graphical parameter
## Warning in axis(side = side, at = at, labels = labels, ...): "PCH" is not a
## graphical parameter
## Warning in box(...): "PCH" is not a graphical parameter
## Warning in title(...): "PCH" is not a graphical parameter
#systematic Relationship to the plot
abline( a=310, b= -40)