我正在尝试使用data.frame的两个子集列。这里是mtcars的例子。怎么了?谢谢你的帮助
ggplot(mtcars) +
geom_jitter(aes(y=mtcars[c(1:10), "mpg"], x=mtcars[c(1:10), "cyl"]), colour="blue") +
geom_smooth(aes(mtcars[c(1:10), "mpg"], mtcars[c(1:10), "cyl"]), method=lm, se=FALSE)
我收到此错误
Error in data.frame(x = c(6, 6, 4, 6, 8, 6, 8, 4, 4, 6), y = c(21, 21, :
arguments imply differing number of rows: 10, 32