You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
402 B
26 lines
402 B
3 years ago
|
library(corrplot)
|
||
|
library(lattice)
|
||
|
|
||
|
a <- mtcars
|
||
|
a
|
||
|
mcor2 <- cor(mtcars$gear, mtcars$carb)
|
||
|
mcor2
|
||
|
|
||
|
xyplot(gear ~ carb, data = mtcars)
|
||
|
|
||
|
lm <- plot(mtcars$gear, mtcars$carb)
|
||
|
abline(lm(mtcars$gear~mtcars$carb))
|
||
|
|
||
|
mcor <- cor(mtcars)
|
||
|
mcor
|
||
|
round(mcor, 2)
|
||
|
|
||
|
corrplot(mcor)
|
||
|
|
||
|
plot(mtcars)
|
||
|
|
||
|
library(ggplot2)
|
||
|
qplot(gear, carb, data = mtcars)
|
||
|
|
||
|
cor(mtcars$wt, mtcars$mpg)
|
||
|
qplot(wt, mpg, data=mtcars, color=factor(carb))
|