This directory contains data files accompanying the text Introduction to the Practice of Statistics by Moore, McCabe and Craig. They are taken from the publisher's website http://bcs.whfreeman.com/.
f <- "http://www.math.csi.cuny.edu/verzani/classes/MTH214/R/Data/ex10_028.txt" df <- read.table("f", header=TRUE) dim(df)
[1] 31 2
names(df)
[1] "loc" "lvoplus"
mean(dflvoplus)
[1] 6.741839
The return value of read.table is a data frame, even for univariate data, so variable names are referenced as above or an alternative manner.