[R] Error message handling

Kang.Changku@epamail.epa.gov
2004-06-23T21:24:14Z

Dear, R experts.
Does anybody have experience with 'optim' function?

I have an error message as the following.

Error in optim(transcoefs, fn = hfdeviance, gr = hfdeviance.grad, method
= "BFGS",  :
initial value in vmmin is not finite

I want to make a comment when this happen.
Is there way I can put *my* message after this error occur?

Thanks in advance

+++++++++++++++++++++++++++++++++++++++++++++++++++++
Changku Kang
National Center for Environmental Assessment
EPA  (B211F)
919-541-1396
919-541-0245 (fax)
Kang.Changku at epa.gov

Graduate Student
Department of Statistics, NCSU
ckang2 at stat.ncsu.edu
919-513-2956
+++++++++++++++++++++++++++++++++++++++++++++++++++++