Skip to content
Prev 262925 / 398502 Next

Scatter plot produces "'x' and 'y' lengths differ"

It likely means that your x and y are differently long. That is, affect1 and
adh1scr do not contain the same number of values in that instance. That
precludes them from being plotted against each other. abline and lowess
would fail for the same reason.

x<-c(1,2,3)
y<-c(2,4)
plot(y~x)
complete.cases(x,y)

However, what is peculiar about this is that if x and y indeed have
different length, the complete.cases() function should fail (unless
specified with some override argument).

The problem is definitely NOT one with XLIM or YLIM.

HTH,
Daniel
Alspach, Steven E. wrote:
--
View this message in context: http://r.789695.n4.nabble.com/Scatter-plot-produces-x-and-y-lengths-differ-tp3604367p3604688.html
Sent from the R help mailing list archive at Nabble.com.