[R] showing error line

Duncan Murdoch murdoch.duncan at gmail.com
Thu Jun 20 14:00:20 CEST 2013

On 13-06-20 7:42 AM, Jannis wrote:
> Dear R users,
> i am trying to get the line number of the code where an error is
> produced. With the options:
> options(keep.source = TRUE, show.error.locations = TRUE,
> keep.source.pkgs = TRUE)
> I have managed to get the error locations to show up when i source the
> respective files. They do not, however, show up for the same errors when
> I use installed packages. Do I have to build these packages in a
> specific way?

You need to install them from source with those options in place.  A 
binary install won't include the line number information.

If you do your installs from the command line, you can set environment 


but you can also do it from within R with the options above, using

install.packages("foo.tar.gz", type="source", repos=NULL)

Duncan Murdoch

More information about the R-help mailing list