This is the second in a series of lectures on R.
R is command-line software. We need to type in commands. These commands should be SAVED so they are not forgotten. Because of this, we must set up a folder and file and know where those folders and files are on our computers.
Windows Set up a folder on the “C” drive. Call it “myR”. It IS case sensitive.
Mac Set up a folder on your DESKTOP. Call it “myR”. It IS case sensitive.
Linux Set up a folder in your home path. Call it “myR”. It IS case sensitive.
Next, open a text editor. DO NOT USE MICROSOFT WORD. That software contains hidden characters that WILL interfere with R. Use Notepad or Wordpad or other text editor. If you ignore this warning you will suffer.
In the myr folder, save the file “myRcode.R”. In Windows, this might save as “myRcode.R.txt“. Windows has a nasty habit of thinking it knows what you want. If you are using Notepad or other Windows software, be sure that the type of file to save is “All files” or similar words. If you do not pay attention to me you will suffer.
Cut and paste the following block of text into your myRcode.R file and SAVE it.
x = 7
y = 8
We will cut & paste this code from the file myRcode.R into the R command window. EACH TIME REMEMBERING TO HIT THE ENTER KEY (inside R).
Next time: actual math! The next lesson will appear tomorrow.
All videos are on YouTube under the username “mattstat” (wmbriggs was taken). That service imposes a ten-minute limit of videos. Accordingly, lectures are short.
All questions to email@example.com.