########## ## # Reading the data into R: ff <- tempfile() cat(file=ff, " A 85 B 90 C 93 D 98 A 82 B 92 C 94 D 98 A 83 B 90 C 96 D 100 A 88 B 91 C 95 D 97 A 89 B 93 C 96 D 97 A 92 B 81 C 94 D 99 ", sep=" ") options(scipen=999) # suppressing scientific notation insectdeaths <- read.table(ff, header=FALSE, col.names=c("insecticide", "dead")) # Note we could also save the data columns into a file and use a command such as: # insectdeaths <- read.table(file = "z:/stat_516/filename.txt", header=FALSE, col.names = c("insecticide", "dead")) attach(insectdeaths) # Making "insecticide" a factor: insecticide <- factor(insecticide) # The data frame called insectdeaths is now created. #########