Aesthetics must be either length 1 or the same as the data (207): x, y
问题 I just merged two datasets horizontally in R, but when I consequently try to plot two variables (one from the first and one from the second dataset), I get the message 'Aesthetics must be either length 1 or the same as the data (207): x, y' TreismanData2<-read_dta("TreismanData.dta") library(ggplot2) TreismanData3<-merge(TreismanData2, QT_Row, by="wbcode") attach(TreismanData3) scatterGCBPI<-ggplot(TreismanData2, aes(cpi2007, GCB2013)) scatterGCBPI+geom_point(position = "jitter")+geom_smooth