Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RStudio - How can I have a 3 columns layout?

Tags:

r

ide

rstudio

I'm desperately trying to have as default a 3 columns layout in RStudio and can't manage to obtain it.

I tried to find some documentation, but found nothing with some details or explanation on the "panes" parameters of the rstudio-prefs.json file.

In "C:\Users...\AppData\Roaming\RStudio\rstudio-prefs.json", I saw that it is possible to add a source column using "additional_source_columns": 1 but it is automatically set back to 0 every time I restart R and the problem is that it creates an untitled script in addition to the one I'm opening.

Here are the steps I have to perform to obtain the final layout I'm looking for.

Open a script by double clicking on it

Press CTRL + F7 to add a source column

Drag and drop my script to the left column

remove the 'untitled' script

Thank you for your help ! A link to any documentation that you may know of that I didn't find would be life-saving.

Best


1 Answers

As of today, you can't have a 3 column setup as the default. It's an open Issue on GitHub, marked as an enhancement and added to the "Later" milestone with no due date.

However, with version 2022.02.0+443 (February 2022) of RStudio you can do the following:

  • Uncheck the option "Restore last opened documents on startup" in Global Options. This will have RStudio open project with no source panes at all.
  • Using the new option "Open file in Source Column" to open your first file in a new column. This will give you the three columns layout you're looking for.

I would add the "Open file in new column" as a keyboard shortcut, for example CTRL + O. Your workflow would then be:

  1. Open RStudio
  2. CTRL + O to open your first script
  3. Open more scripts any way you want - they will be added to the first column.
like image 94
jpiversen Avatar answered Sep 19 '25 10:09

jpiversen