This section introduces you to getting your local computer setup.
If you’ve taken an R class before, I highly recommend uninstalling both R and RStudio before starting the below instructions.
Managing your folders and files is a key skill. This page walks you through the major things you should know.
When you save a file, it goes into the hard drive on your computer.
This hard drive (called the C:\
on Windows) organizes files
into certain locations, called folders.
All modern systems store your files in several folders:
Downloads
: this is supposed to be temporary spot for
files downloaded by Safari or Chrome.Desktop
: files/folders visible on your desktopDocuments
: where you should store your long-term
filesOne wrinkle is that Windows often uses OneDrive. OneDrive is an online service that syncs your local files with servers in the Internet. Files are typically still stored on your computer, but are regularly uploaded. So, if you have OneDrive turned on, typically the OneDrive Downloads/Desktop/Documents is the same as the location on your hard drive (usually C:).
Organize your files: link to video on YouTube
Here is a quick guide for organizing your files, slightly more focused on the Mac. link to video on YouTube
You should have a folder for our class. Then, create a folder for each week or major project. Store your files inside of this folder.
Right-click in a folder, and choose New folder
(or press
Control+Shift+N
)
Avoid modifying any files in your download folder. Instead, download them, and then copy them to the appropriate folder.
I suggest disabling the Force touch feature:
System Preferences
Trackpad
, the Point & Click
tabForce click and haptic feedback
Right-click on a file, right-click copy, go to the new place, and
click paste. Or, move a file by opening a separate Finder
window, and dragging/dropping your files.
One more thing that would be helpful in our class is to turn on file
extensions. This will tell you the hidden information that lives in ever
file’s name. So, when you save a Word document as my stuff
,
it actually is saved as my stuff.docx
. The
.docx
tells the computer to open the file in Word.
As we work with more complex files, you will find that you can not just click on a file to open it in the right program. Instead, get in the habit of opening a program first. Then, inside of the program, open the file (usually by going to the file menu and choosing open).
To turn on:
Do not depend on program state or .RData files! I must be able to run your code as it is submitted in the R file. I strongly suggest closing and re-opening R, and then running all of the code to make sure it works properly.
There are several vital shortcuts:
<-