Re: [R] during fitting of successive datasets, stall crashes iterations

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Wed 11 Oct 2006 - 03:48:41 GMT

See ?try or ?tryCatch. The basic idiom is given here:

https://stat.ethz.ch/pipermail/r-help/2005-May/072035.html

On 10/10/06, Warren <geelewis@gmail.com> wrote:
> Hi all,
> I am trying to do fitting of large sets of timeseries data, and error
> messages derail the process when I encounter a dataset that doesn't fit. I'd
> like to ignore those "misfits" and try another equation or move to the next
> dataset. Any ideas? (piece of code below)
>
> Thanks, --Warren
>
> ##The code looks something like this:
> attach(zf)
> x <- hours
> n<-length(zf[,2])
> for (i in 2:n)
> {y <- zf[,i]
> plot(y ~ x, xlab = "Time (h)", ylab = Lumi, pch = 15)
> # fitting algorithm looks like this:
> sine<- nls (y ~ baseline + trend*x + amplitude*(sin(2*pi*(x+phase)/period)),
> start=list(baseline=4000, amplitude=4000, phase=0, period=24, trend=0),
> trace=TRUE)
> ...
> }
>
>
>
>
> --
> Warren G. Lewis
> geelewis@gmail.com
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@stat.math.ethz.ch 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.
>



R-help@stat.math.ethz.ch 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. Received on Wed Oct 11 13:52:14 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 11 Oct 2006 - 04:30:09 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.