You can set and examine a variety of global options which affect the way in which R computes and displays its results. You may want to skim the section Options used in base R of the help file of base::options() – at the end you’ll see a list of factory-fresh default-settings that looks like this:

##      option value
## 1  continue     +
## 2    digits     7
## 3 max.print 99999
## 4    prompt  "> "
## 5     width    80

For a comprehensive view you can use View(options()), which in RStudio will look like this:

You can examine the value of any option with getOption("some-option").

## [1] 1000

And you can change any option with something like this: options(some-option = new-value).

options(max.print = 999)
## [1] 999

R options() are session dependent: Your changes remain active only until you restart your R session.

After you restart your session the values return to their original values.

## [1] 1000

If you want your change to remain for future sessions you can set the option not in the R console but in the .Rprofile file. (If this is the only change you want to make, you don’t need to know what or where an .Rprofile is.) The easiest way to edit your .Rprofile is with the function edit_r_profile() of the usethis package.

# install.packages("usethis")

This will automatically open .Rprofile for you so you can edit it.

Follow the prompts:

  • Modify ‘.Rprofile’
  • Restart R for changes to take effect

Then you can close .Rprofile and forget about it. Now every R session will run with your preferred option.

## [1] 999