![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
Here are some examples of code to show the analysis displayed in the text. The files below are text files although they may have different extensions according to statistical software packages they were written. Thus, both the R and SAS codes have the extension of ".txt". You may wish to save them with different extensions. Many users of R use the extension ".R" and many users of SAS use the extension ".sas".
Mac Users: Please note that the function read.csv(choose.files(), header=TRUE) WILL NOT work on a Macintosh computer. Instead, you will have to enter in the filename manually.
Here is an example as to how to read a comma separated data file into "R":
healthexp = read.csv("file:///Users/adamfrees/Documents/HealthExpend.csv")
Date: 25 October 2018 |