R Environment setup

Advanced Data Analysis 1 and 2, Stat 427/527 and Stat 428/528, Prof. Erik Erhardt, UNM


Erik Erhardt


August 21, 2022

Modern computers try to do a lot of things for you. Sometimes their decisions aren’t suited for your purpose. Below I show you how to set up aspects of your computing environment to be more friendly to programming in R.

Show file name extensions

We want to see both the filename and extension for all filenames: filename.ext. The default is to hide these .ext extension parts for known files since the icon indicates the program association for a file. However, if we can’t see the extension, then we may not be able to change it; also, it makes it hard to diagnose problems when this is hidden.



Windows 8 and 10

  1. Open File Explorer
  2. Click the “View” tab on the ribbon.
  3. Activate the “File name extensions” box in the Show/hide section
  4. Toggle “file extensions” on.
  5. File Explorer will remember this setting until you disable it in the future.

Windows 7

  1. Open File Explorer
  2. Click the “Organize” button on Windows Explorer’s toolbar
  3. Select “Folder and search options” to open it.
  4. Click the “View” tab at the top of the Folder Options window. There are lots of options here you may want to change.
  5. Disable the “Hide extensions for known file types” checkbox under Advanced settings.
  6. Click “OK” to change your settings.



  1. Open Finder
  2. Go to Finder > Preferences (Command-,)
  3. Choose “Advanced” and turn on “Show all filename extensions”


If you use Linux, it’s unlikely to do troublesome things for you. Also, you probably know how to tweak stuff like this.

More to come as issues arise in class