Never mind, I found the problem. In my profile s was assigned to summary. This is why it did not work.
On Thu, Nov 20, 2014 at 5:14 PM, Dimitri Liakhovitski <dimitri.liakhovit...@gmail.com> wrote: > Dear R-ers, > > apologies for not providing the full code. I just need a point in the > right direction. > I have a data frame ('temp') with 1,200 rows and 2 variables. > I am using ggplot2 to create a scatter plot: > > This is my code and it works fine, it creates a scatter plot: > > library(ggplot2) > sp10<-ggplot(temp,aes(x=p.used_L1,y=l.to.r.ratio_L1)) > sp10 + geom_point() > > However, when I change the last line to: > sp10 + geom_point() + stat_smooth(se=FALSE) > > Then I am getting these messages (and no fitted line on the graph): > > geom_smooth: method="auto" and size of largest group is >=1000, so > using gam with formula: y ~ s(x, bs = "cs"). Use 'method = x' to > change the smoothing method. > Error in s(x, bs = "cs") : object 'x' not found > > I don't understand what x in in s(x, bs = "cs") is or should be. > I lookeed up ?geom_smooth and tried this: > > sp10 + geom_point() + stat_smooth(se=FALSE,formula = l.to.r.ratio_L1 ~ > p.used_L1) > > Still, the same error message. > > Thanks a lot for your advice! -- Dimitri Liakhovitski ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.