Topic 1 Installing R and RStudio

1.1 How do I install the R build tools?

If you are not able to install packages from source, you are missing the build tools that are used to compile source code into files that the operating system can execute.

October 24, 2019. -DB

1.2 I’m getting an error when I try to start up RStudio.

1.2.1 I am on a campus computer, and the error is: “Fatal error: unable to initialize the JIT”

This is due to a bug in your campus profile. Please speak to the IT Helpdesk.

November 6, 2019. -DB

1.3 I am using MacOS 10.15 Catalina

When you first open RStudio, you might get a warning that says:

The “git” command requires the command line developer tools. Would you like to install the tools now?

Click Install just in case Apple sorts out their probelm so you get the most up to date version. But you’re likely to get this error message:

Can’t install the software because it is not currently available from the Software Update server.

Go to Apple Developer. You might need to sign in with your Apple ID.

Choose Command Line Tools for Xcode 12 (not the beta) at https://developer.apple.com/download/more/. You don’t need to install Xcode 12. Download the DMG, open it, and follow the instructions to install it. You will need your computer password.

More Downloads for Apple Developers - install Command Line Tools for Xcode 12

After you install the command line tools, you can delete the disk image (.dmg file). Quit RStudio if it is open and reopen it.

You might be asked to install new packages, such as xfun. Just click Yes to install them. If you are not asked to install packages when you open RStudio, or after you do install them, try to open a new R Markdown file. This will probably prompt more installations.

Install Required Packages

There will be a lot of red output in the RStudio console, but this is normal.

Installing Packages

After this, try to make a new R Markdown file and knit the demo file to html. You should be all set now.

Thanks to Ashley McCluskey for figuring out where to get the command tools!

2020 October 1 -LDB