Displaying 2 results from an estimated 2 matches for "lgab".
Did you mean:
lab
2006 Jun 13
3
if syntax error :(
Umm sorry to bother everyone again but I'm having trouble with my if
statement. I come from a perl background so that's probably my problem! :)
So here is my code:
if (any(lgAB>4) | any(lgAB<-4)){
freq_AB<-hist(lgAB, type="o", plot=F)
else
freq_AB<-hist(lgAB, breaks=br,type ="o", plot=F)
}
And I get
> source("E:/R/GMDA-1.1.R")
Error in parse(file, n = -1, NULL, "?") : syntax error at
11: freq_AB<-h...
2006 Sep 29
1
linear gradient in nls
...nt. I apologies if I haven't supplied enough
information or I have made some mistake in my coding. The coding below works
on some of the data but not all.
Thank you for your time,
Paul Benton
brseq <- seq(-4.0, 4.0, by=0.1)
AB<- A[,1]/A[,2]
lgAB<-log(AB)
freq_AB <-hist(lgAB, type="o", breaks=brseq, plot=F
freq.tab <- as.data.frame(cbind(brseq, freq_AB$counts)
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=T...