How to open a script (.r) file
- Download this file:
- Open RStudio.
- At the top of the screen, select File > Open.
- 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:
- Open the file in RStudio (and see that the file is still blank).
- At the top of the screen, click File > Reopen with Encoding.
- 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:
- searching Stack Overflow for someone with a similar issue or posting an issue yourself
- searching RStudio's official community for someone with a similar issue or posting an issue yourself