[R] Unable to run smoother in qplot() or ggplot() - complains about knots
istazahn at gmail.com
Fri Mar 13 13:57:12 CET 2009
> From: Christopher David Desjardins <cddesjardins at gmail.com>
> To: r-help at r-project.org
> Date: Thu, 12 Mar 2009 17:37:26 -0500
> Subject: [R] Unable to run smoother in qplot() or ggplot() - complains about knots
> I get the following error when I run qplot()
> qplot(grade, read,data = hhm.long.m, geom = c("point", "smooth"))
> Error in smooth.construct.cr.smooth.spec(object, data, knots) :
> x has insufficient unique values to support 10 knots: reduce k.
> I am not sure how to tackle this problem. When I take a subsample (< 1000) than I am able to run that function but with my sample of ~ 40,000 qplot gives me that error. I have 6 grades.
> Please cc me on reply.
Have you read the documentation for stat_smooth? It's not clear to me
what the problem is, because I'm not sure what the defaults are. But
since the default's are not working, I would try it with different
settings. See http://had.co.nz/ggplot2/stat_smooth.html.
More information about the R-help