Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # help
- help(plot)
- help(mtcars)
- # mtcars
- head(mtcars)
- # variable info
- str(mtcars)
- # One continuous variable
- plot(mtcars$mpg)
- # One categorical variable
- plot(as.factor(mtcars$cyl))
- # Two continuous variables
- plot(mtcars$disp, mtcars$mpg)
- # Two categorical variables
- plot(as.factor(mtcars$am), as.factor(mtcars$cyl))
- # Continuous/Categorical variable
- plot(mtcars$mpg, mtcars$cyl)
- # Categorical/Continuous variable
- plot(as.factor(mtcars$cyl), mtcars$mpg)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement