[R] ggplot2: goem_smooth and suppress messages

tibaker tibaker at gmail.com
Fri Mar 16 00:11:54 CET 2012


Hi

When I run my script using ggplot and geom_smooth I get messages that I
would like to suppress:

p <- ggplot(dataSubset)
p <- p + aes(x = as.Date(factor(key),format="%Y%m%d")) + geom_line()
p <- p + geom_smooth(span=0.2,se=FALSE,size=0.7)

The messages look like this:
geom_smooth: method="auto" and size of largest group is <1000, so using
loess. Use 'method = x' to change the smoothing method.
There were 15 warnings (use warnings() to see them)

I have tried 
p <- p + suppressMessages(geom_smooth(span=0.2,se=FALSE,size=0.7))

but this does not work. I would like to keep using method="auto" but without
any messages.

Any ideas on how to suppress the messages when using geom_smooth?
Thank you!

--
View this message in context: http://r.789695.n4.nabble.com/ggplot2-goem-smooth-and-suppress-messages-tp4476700p4476700.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list