Dear list,

When I try to use lines.formula with subset and another argument I get an error.
e.g.

x<-1:5
y<-c(1,3,NA,2,5)
plot(y~x, type="n")  # set up frame
lines(y~x, subset=!is.na(y))  # works OK
lines(y~x, type="o", col="blue")  # works OK
# but
lines(y~x, subset=!is.na(y), col="red")  # gives an error:

Error in if (length(x) == l) x[s] else x : argument is of length zero

Why does this happen?

With thanks,
John

=========================
John Field Consulting Pty Ltd
10 High Street, Burnside SA 5066
Phone 08 8332 5294 or 0409 097 586
Fax   08 8332 1229
Email  [EMAIL PROTECTED]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to