Michael,

            

            I'm also playing with the nls function trying to get it to work
with a Gaussian. My lines that I have at the moment and I hope will help you
are 

 

class(fo <- (x ~ (A/(sig*sqrt(2*pi)))* exp(-1*((bin-mu)^2/(2* sig^2)))))

nls.AB <- nls(fo,data=freq.tab, start= list(A=0.1*len, mu=0.01, sig=0.5),
trace=TRUE)

 

            So first I create the eq to put into the nls function, my var
are the freq.tab which is a list of some binned frequency into 0.1 units and
the len is amount of features in the data. I'll say quickly that at the
moment I am getting a 'singular gradient error'. I hope that this helps.

 

            Cheers.

 

            Paul Benton

            

Research Technician

Mass Spectrometry

   o The

  /

o Scripps

  \

   o Research

  /

o Institute

 


        [[alternative HTML version deleted]]

______________________________________________
[email protected] 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.

Reply via email to