How to open a script (.r) file

  1. Download this file:
  1. Open RStudio.
  2. At the top of the screen, select File > Open.
  3. Open the script file that you downloaded and make sure it isn't blank.

FAQS

What if RStudio won't open?

See RStudio's official page on troubleshooting RStudio not starting.

What if I open the script file and it is blank?

If you open the script file and it appears to be blank, try the following:

  1. Open the file in RStudio (and see that the file is still blank).
  2. At the top of the screen, click File > Reopen with Encoding.
  3. Select UTF-8.

If this solution does not work, unfortunately, you may need to research alternative solutions for your particular operating system or uninstall and reinstall R/RStudio.

What if I still have an issue opening the script file?

If you are in a course or research group that uses R, the fastest way is to get help is to ask instructors, TAs, or classmates for help.

If you are not able to do so, consider these resources: