Changing Font in RSudio -- Mac

Return to Software Installation page

RStudio has an initial font size of 10. It has been my experience that size 10 font is too small for students to use, especially on small screens often found on laptop/notebook computers. This page walks the reader through the steps to change that font size. Once changed on a computer the new font size should become the default.

Please note that the images shown here walk through all of the steps that we would take, including creating a subdirectory, copying model.R, renaming the file, and then starting RStudio from there. The actual steps to change the RStudio font size start in the text above Figure 18. If you are comfortable with the preliminary steps feel free to jump to that text directly.

The images shown here are, in general, reduced for display. In order to see a larger version of the image you should be able to point to image image, right click on that image, and then select the option to view the image in a separate window or tab.

Figure 1 shows the icon for our installed USB drive sitting on the desktop.

Figure 1

Double click on that icon to open Finder to look at the directory (the list of files and/or folders) on the USB drive. The Finder screen is shown in Figure 2.

Figure 2

Our first task will be to create a new sub-directory. To that end, click on the tools icon,  highlighted in Figure 2. This opens the options box shown in Figure 3.

Figure 3

There we want to click on the highlighted "New Folder" option. That creates the new folder, shown in Figure 4, with the default name "untitled folder".

Figure 4

At this point we can rename the new folder as sample run by typing that name, as is shown in Figure 5.

Figure 5

The next task is to copy our file model.R from our USB drive and to put that copy into our newly created folder, now called sample run. In Figure 6 we have "clicked once on" the file model.R.

Figure 6

Then we can open the tools icon, , to view the options box shown in Figure 7.

Figure 7

There we click on the 'Copy "model.R"' option. Then, we can point to the new folder, sample run, and click on that to open the new folder.

Figure 8

Once we have clicked on that folder name the contents of the folder, if there are any, will be displayed in the next pane shown outlined in red in Figure 8. Of course, since this is a new folder it starts out empty.

We click on the tools icon, , highighted in orange in Figure 8, to open the options box shown in Figure 9.

Figure 9

There we move down to the "Paste item" item and click on it to paste the copy of model.R into this folder. The result is shown in Figure 10.

Figure 10

We really should change the name of this file. If need be we could click one time on the file name to select it, but it is already selected in Figure 10 so we can just move on from there. We click on the tools icon again to open the options box shown in Figure 11.

Figure 11

Then we find and click on the "Rename" option, shown in Figure 12.

Figure 12

Doing that will open the file name for us to change. In this example we will change the name to makebig.R as shown in Figure 13.

Figure 13

Normally, to use that file to open RStudio and to load that file into the RStudio editor we would just double click on the file name. However, if this is the first time we are doing that the computer does not knbow about that file association (i.e., that files ending in .R need to be opened with RStudio). Therefore, in this case, we will use the tools options to start the program.

With the file name makebig.R highlighted we click on the tools icon. This opens the options box shown in Figure 14.

Figure 14

We point to the "Open with" option. That, in turn, opens a secondary options window as shown in Figure 14. In that secondary window we could select "RStudio" but, for a special reason, we will instead select "Other...". This will open a new Finder window showing all of the applications that are present on this computer. The computer used here generated the start of the list as shown in Figure 15.

Figure 15

We scroll down to find RStudio and then click on that to highlight it. It is at this point that the reason for opting to use the "Other..." option becomes evident. On this window there is a box that we can check to indicate "Always open with", meaning that hence forth this computer will associate RStudio with files ending in .R. We check that box and the window should appear as in Figure 16.

Figure 16

Then click on the "Open" button. After a moment the computer will start RStudio and it will have the file now called makebig.R loaded into the editor pane. Our screen should now appear as in Figure 17.

Figure 17

One might note, in Figure 17, how small the text is in the editor and console panes (the panes on the left). We want to change the size of that font.

Actually change the font

To do this we click on the "Tools" menu option, highlighted in Figure 17. Doing this opens the dropdown box shown in Figure 18.

Figure 18

In that dropdown box find and click on the "Global Options..." entry. This will open, in a few seconds, a new window for controling the global options for RStudio.

Figure 19

The set of options we want to use are under the "Appearance" icon at the left of the window. Click on that icon to move to Figure 20. There we see many global values that we could change. However, for our purposes we just want to change the Font size.

Figure 20

Therefore, click the down arrow in the Font size option and select a larger font size. For many situations the most "comfortable" size seems to be in the 14 to 16 range, Here we chose 16 as our new font size, as is shown in Figure 21.

Figure 21

Figure 22 not only shows that the font size setting has changed, it also shows how the new font will be displayed. Comparing Figure 20 and Figure 22 you can see the effect of changing the font size by looking at the sample text shown in the pane on the right side of the window.

Figure 22

Click the Ok button to accept the change.

RStudio returns to display a new version of what we had back in Figure 17.

Figure 23

Again, comparing Figure 17 to Figure 23 we see how much easier it is to read the text in the editor and console panes now that we are using a larger font size.

This is all that we need to do to change the font size. Once this has been done, then the next time that we start RStudio on this computer it should start with the font set as we have done here.

All we need to do now is to exit RStudio in a nice way. To do that, type q() in the console pane, as shown in Figure 24, and then press the ENTER key on the computer keyboard. [You might note that since we did not do any R work and since we did not change anything in the editor pane, oin this case R does not ask for a confirmation to exit our session.]

Figure 24



Return to Software Installation page
©Roger M. Palay     Saline, MI 48176     January, 2018