theCAT
  
Report a Problem:
Email: support@cat.pdx.edu
Phone: 503-725-5420
Location: FAB 82-01
  USERS PLATFORMS SYSTEM RESOURCES    
Home Students Fac/Staff CS Tutors Guidelines Windows Linux Mac Mail Network Software Web TheCAT Sitemap Contact
arrowHome arrow Software arrow Using R in MCECS Wednesday, 29 March 2017  
Software
Using R in MCECS Print
Written by thyme   
Thursday, 18 February 2016

Configuring RStudio in MCECS

The first time you run RStudio in MCECS you must configure it. This simple process  involves configuring RStudio to find and use an appropriate version of R. When you start RStudio, the popup will ask you to “Choose  a specific version of R.“

 Image
  
Use Browse to specify the folder: P:\Programs\R\R
 
Image
 
 Choose an appropriate version to use (most likely 64‐bit) 
 
Image 
 
 That’s it!  You will not have to repeat this step. If however, you decide you need to change the  version of R you are using, you can do that under Tools; Global Options; Change
 
Image
 

Working Directory and Library Folder

Two other changes you should make are to your Default Working Directory and Library Folder.
 
Again under, RStudio; Tools; Global Options, set your Default Working Directory by using  Browse to find (you may need to Create a new Folder called R) N:\My Documents\R
 
Image
 
Second, to change your Library Folder, first create a new Folder on your N: drive called RLIBS
Eg.   md N:\RLIBS
 Next, create an Environmental Variable called R_LIBS and set it to the folder N:\RLIBS    
  Eg.  set R_LIBS=N:\RLIBS  
To set the variables permanently, open the start menu and search environment. This will launch the Environment Variable editor.
Then click on new, enter the Variable name and corresponding value like shown. 
 
Image
 

Please avoid using UNC Pathnames with R and RStudio

UNC Pathnames of the form eg. \\KHENSU\HOME\USERNAME or “DESKTOP” are not supported  by R and RStudio and are known to cause problems. 
 

Resetting your R Environment

If your RStudio User Configurations becomes messy or corrupt and things stop working as  expected, you can Reset them using our FIXIT scripts. Find on the Start Menu.
Start; Programs; General Applications; Fix It  Find RStudio in the list and press “Fix It”  
 
 Image
Last Updated ( Thursday, 18 February 2016 )

©1999 - 2017 TheCAT