[R] ggplot2 error: arguments imply differing number of rows

ux.seo oscar815 at gmail.com
Thu Apr 5 18:56:35 CEST 2012


As  you got the error message, to use ggplot function, you had better make a
data.frame with your data "d".
for example, d[ n x p], n : observations, p : variables
n = dim(d)
dd = data.frame(x=d[,2:n[2]], y=d[,1])
then, you may get the better result after apply "dd" to the ggplot function.

> p1 + geom_line(aes(x=x,y=predict(m2,list(xv=x))), color="red")
Error in data.frame(evaled, PANEL = data$PANEL) :
  arguments imply differing number of rows: 100, 18 
This example is from "The R Book" by Michael J. Crawley.



--
View this message in context: http://r.789695.n4.nabble.com/ggplot2-error-arguments-imply-differing-number-of-rows-tp4535261p4535432.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list