Dear all, I have a plot with two gaussian distributions:
ggplot( tofdf, aes( x = tof, y = counts ) ) + geom_histogram( stat = "identity", position = "stack", fill = 2 ) + geom_smooth( method = "nls", formula = y ~ (a/b)*exp(-(x-c)^2/(2*b^2)) + (d/e)*exp(-(x-f)^2/(2*e^2)), se=F, start=list(a=100, b=1, c=695, d=100, e=1, f=710), control=nls.control(tol=1E-5, minFactor=1/1024), n = 1000 ) Now I would like to extract some values for further calculations. These are: 1st: mean of the two gauss fits ( c and f ) 2nd: ±3 sigma integral of the two gaussians 3rd: minimum between the two gaussians How can I extract these values from the geom_smooth function? And is there an easy way to find the minimum? Thanks in advance Joseph ______________________________________________ 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.