search for: curiouslearn

Displaying 1 result from an estimated 1 matches for "curiouslearn".

2011 Nov 10
2
plotting a function with given formula in ggplot2
Hi All, I have a scatter plot produced using ggplot2 and I want to add the regression line to this scatter plot. I suppose I can use geom_smooth() to do this, but for the sake of learning ( I am new both to R and ggplot2), I want to try and add it as a function (something that curve() does in the standard R plotting). I did some search and found that stat_function() can be used for this. But