On Oct 3, 2010, at 1:58 PM, nisaf wrote:
Hi All. I am a new R user. Trying to do scatterplot. Not sure how to
resolve this error message
A-subset (ErablesGatineau, station==A)
B-subset (ErablesGatineau, station==B)
plot(diam ~ biom)
Did you also attache either (or both??? of those data.frames)?
abline(lm(diam ~ biom), col = red)
goodcases - !(is.na(diam) | is.na(biom))
lines(lowess(diam[goodcases] ~ biom[goodcases]))
library(car)
scatterplot(diam ~ biom, reg.line = lm, smooth = TRUE,
+ labels = FALSE, boxplots = FALSE, span = 0.5, data = A)
Error in `row.names-.data.frame`(`*tmp*`, value = FALSE) :
invalid 'row.names' length
Given the fact that you deemed it necessary to pre-qualify your data
when you constructed goodcases, the invalid row.names length error
suggest you may need to supply scatterplot() when using the reg.line
argument with data that has been similarly culled of NA values.
?complete. case
?na.omit
Perhaps trying with a data=A[goodcases, ]
--
David.
[[alternative HTML version deleted]]
__
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.
David Winsemius, MD
West Hartford, CT
__
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.