stat_loess fails with weights argument

184 views
Skip to first unread message

Mike Lawrence

unread,
Mar 30, 2009, 12:58:15 PM3/30/09
to ggp...@googlegroups.com
ggplot(mtcars, aes(y=wt,
x=qsec))+geom_point()+stat_smooth(method='loess',weights=mtcars$carb)

Error in method(formula, data = data, weights = weight, ...) :
formal argument "weights" matched by multiple actual arguments

--
Mike Lawrence
Graduate Student
Department of Psychology
Dalhousie University

Looking to arrange a meeting? Check my public calendar:
http://tinyurl.com/mikes-public-calendar

~ Certainty is folly... I think. ~

Mike Lawrence

unread,
Mar 30, 2009, 1:00:24 PM3/30/09
to ggp...@googlegroups.com
Nevermind! As usual I wasn't thinking about the mapping correctly. This works:

ggplot(mtcars, aes(y=wt,
x=qsec))+geom_point()+stat_smooth(method='loess',aes(weight=carb))

Reply all
Reply to author
Forward
0 new messages