David Parkhurst
2014-Feb-08 20:28 UTC
[R] Plotting a loess line when the abcissa variable has numerous NA's
I have a situation in which I want to plot a variable Y against X, and then to add a loess line to that plot. My X variable is 366 elements long, and about 1/3 are NA's, scattered through the list. None of the corresponding Y's are NA's. Everything I?ve tried so far, by mimicking examples from four different books, produces a messy scramble of lines when I try to plot the loess curve. How can I deal with this situation? Thanks for any help.
David Winsemius
2014-Feb-08 20:58 UTC
[R] Plotting a loess line when the abcissa variable has numerous NA's
On Feb 8, 2014, at 12:28 PM, David Parkhurst wrote:> I have a situation in which I want to plot a variable Y against X, and then to add a loess line to that plot. My X variable is 366 elements long, and about 1/3 are NA's, scattered through the list. None of the corresponding Y's are NA's. Everything I?ve tried so far, by mimicking examples from four different books, produces a messy scramble of lines when I try to plot the loess curve. How can I deal with this situation?Why not remove rows with NA. If you think otherwise, then tell us where you think we should plot the tuples c(NA, Y_i). -- David Winsemius Alameda, CA, USA