2 + 2
[1] 4
April 30, 2025
This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.
When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
You can also make and present smaller calculations like (2 + 2 = ) 4 in line. Or, write properly formatted mathematical statements like (f(x) = f(x_0) + f’(x_0)(x-x_0))). Or, emphasize special results like [f’(x_0) = _{h }.]
Since you opened this file by first opening the associated .RProj file, you should have an easier time loading the data. You can execute the code below by copying and pasting it to the Console window, by placing your cursor on that line and hitting the execution sequence (CMD + RETURN on Mac or CTRL + ENTER on Windows), using the execution commands from the Code toolbar menu, or hitting the Run button in the editor window (notice the down arrow in this button will give you more options).
Below ‘dat’ is a good nickname for data read from a file. The more natural choice ‘data’ is a protected phrase (actually a built-in function), so we shouldn’t use that. You could call the data ‘cards’, but I habitually use ‘dat’ as something fast and easy to type.
Use the following code begin exploring what is in the data. Oe at a time uncomment and execute each line. After the code chunk, describe the output of each command in your own words.
Lacking some of the descriptive annotation and flair that was present on the plot from class, we can recreate the boxplot.
In text below (actually in place of these instructions), describe any challenges you encountered while working through the steps above. After you are done, save your work and Knit the file. Outside of RStudio, from your system’s file browser, zip the entire directory. Ultimately the zip file containing all of your work will be submitted to D2L but we will walk through this at class time to minimize out of class troubleshooting.