This is the fifth in a series of lectures on R.
10 minutes is a shockingly short period of time!
Today, we read in some datasets that come with R. To list, use the data() command, find what you want, then use the name of the dataset in the data() function. Like data(ToothGrowth).
The question mark ? may be used to ask for help for datasets.
Always try summary() for everything. It will almost always give you what you expect.
Also try plot().
Open the myRcode.R file we saved in our myR folder. Windows users have it in their “C” drive. Mac users have it on their Desktop.Linux users have it in their home path.
Reminder: DO NOT USE MICROSOFT WORD.
Cut and paste or type the following NEW block of text into your myRcode.R file and SAVE it.
# Built-in datasets
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: finding commands and plotting! The next lesson will appear on the weekend.
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.