Q:

Add trend lines to some plots

I am new to ggplot2 but decided to learn it because I like its simplicity and visuals. I have a time-series (zoo) with rainfall for several cities. Looking at other questions I found out how to reshape it and plot it:
df <- data.frame(time = time(rain.yr),
                 city = rep(colnames(rain.yr), each = nrow(rain.yr)),
                 value = as.vector(rain.yr)) 
ggplot(df, aes(x=time, y=value)) +
geom_line() +
facet_wrap( ~ city, ncol=4)

I really like the end result in terms of visuals, as it gives one plot per city but with global axes. And I found out how to add trends: stat_smooth(method="lm")
The problem is that I want to add trend lines to some of the plots, not all of them; just the ones where a trend is significant (I have a vector with zeros and ones for sig/non-sig). 
I know how to do it with base graphics (using par and a loop to plot and only adding a line if the trend is significant) but is there a way of doing it in ggplot2? 

A:

As as been suggested, just create a dataframe of the subset you want for smoothing and use that as the data for stat_smooth().
subdf<-diamonds[which(diamonds$clarity %in% c('SI2','SI1')),]
ggplot(diamonds,aes(x=carat,y=depth))+geom_point() + facet_wrap(~clarity) + geom_smooth(data=subdf)

