library(linearModel)

x<- c(3, 4, 9, 6, 7)
y <- c(10, 20, 30, 40, 50)
z<- c(12, 4, 23, 50, 34)

linear_model <- lm(y~x+z)
anova(linear_model)
## Analysis of Variance Table
## 
## Response: y
##           Df Sum Sq Mean Sq F value Pr(>F)
## x          1 438.60  438.60  3.1271 0.2190
## z          1 280.89  280.89  2.0026 0.2927
## Residuals  2 280.52  140.26
cor(x,y)
## [1] 0.6622662
plot(linear_model)