3

In R you can see the line number of an error using the following option:

options(show.error.locations = TRUE)

Is there anyway to enable this feature by default on starting the R interpreter?

Parsa
  • 3,054
  • 3
  • 19
  • 35
  • 1
    Check out [Fun with .Rprofile and customizing R startup | R-bloggers](https://www.r-bloggers.com/fun-with-rprofile-and-customizing-r-startup/) and [Expert R users, what's in your .Rprofile? (closed)](http://stackoverflow.com/questions/1189759/expert-r-users-whats-in-your-rprofile). TL;DR: Edit your .Rprofile! – Therkel Mar 29 '17 at 12:55

1 Answers1

2

Add the option to your user specific .Rprofile file

options(show.error.locations = TRUE)

You can find the folder in which your user specific .Rprofile file should be using this function:

path.expand("~")

If a .Rprofile file does not already exist here, create it.

Parsa
  • 3,054
  • 3
  • 19
  • 35