Post date: Sep 01, 2015 11:32:33 PM
Not a big deal, but maybe helpful keeping things straight.
The link I provided to data sets has those sets without headers: header = F is the default and does not need to be typed; header = T is required when there are headers. When the file doesn't have headers, variables / columns automatically get named V1, V2, etc. So, for the data for Problem 19 in Chapter 01 (CH01PR19.txt) you could do this to change to y (in the 1st column) and x (2nd). (Perhaps someone has located these data files with headers?)
> read.table("~/Somewhere/on/this/ridiculous/computer/CH01PR19.txt") -> c1p19
> head(c1p19,3)
V1 V2
1 3.897 21
2 3.885 14
3 3.778 28
> # Show names!
> names(c1p19)
[1] "V1" "V2"
> names(c1p19) <- c("y","x")
> head(c1p19,3)
y x
1 3.897 21
2 3.885 14
3 3.778 28
> names(c1p19)
[1] "y" "x"
> attach(c1p19)
Of course when you produce analyses for clients (for which you may earn upwards of $150, $200, $250 per hour - so do it RIGHT!) you don't want this:
> plot(y~x)
Instead you want THIS:
> plot(y~x, xlab="ACT Score", ylab="Grade Point Average")