[R-sig-eco] documentation available that further explains error messages?

Kingsford Jones kingsfordjones at gmail.com
Wed May 7 22:27:38 CEST 2008


Hi Jeremy,

Since R is open source, the code is usually the best reference when
you can't decipher an error message.  Often the easiest way to see
what is going on is to type traceback() after receiving the error
message -- this will show you the calls that led to the error.

Another very useful tool is to type
debug(name.of.function.to.be.debugged) prior to calling the function
of interest.
The next time you use that function, debug will take you step-by-step
through the function calls while allowing full interactive ability so
you can, e.g. look at the structure of objects as they are created
within the function (using, e.g., the str function).

Another option is to open the function's source file in a text window
and use Find in your text editor to find the error.

Finally, searching for the error message in the help archives can
often be fruitful.  That technique just led me to this:

https://stat.ethz.ch/pipermail/r-help/2006-January/086747.html

which indicates what the '[2]' is referring to.


Kingsford Jones


On Wed, May 7, 2008 at 12:30 PM, Jeremy Claisse <jclaisse at yahoo.com> wrote:
> I'm trying to figure out how to overcome this error message:
>
>  Error in optim(c(5, -0.5), llfunc.prop.female.age, method = "BFGS") :
>   non-finite finite-difference value [2]
>
>  And particularly would like to know what the "[2]" is pointing towards, I'm
>  assuming that will help me search out the problem.  Is there any
>  documentation available that explains the particulars of error messages?
>
>  Thanks,
>  Jeremy
>
>  Jeremy Claisse
>  Hawaii Cooperative Fishery Research Unit
>  University of Hawaii
>   <mailto:claisse at hawaii.edu> claisse at hawaii.edu
>
>
>
>         [[alternative HTML version deleted]]
>
>  _______________________________________________
>  R-sig-ecology mailing list
>  R-sig-ecology at r-project.org
>  https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>



More information about the R-sig-ecology mailing list