i should draw two graphs the one graph contains all cars with am = 1 and the second graph am = 0
these graphes should be like a panel
par(mfrow = c(1,2)) plot(df.cars$mpg,df.cars$hp) plot(df.cars$mpg,df.cars$hp)
See the FAQ: How to do a minimal reproducible example reprex for beginners because your df.cars is not visible.
reprex
df.cars
par(mfrow = c(1,2)) a <- which(mtcars["am"] == 0) b <- which(mtcars["am"] == 1) plot(mtcars[a,]$mpg,mtcars[a,]$hp) plot(mtcars[b,]$mpg,mtcars[b,]$hp)
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed. If you have a query related to it or one of the replies, start a new topic and refer back with a link.