pdf("ex0403.pdf") # Read in data from ASCII formatted (Fixed With File) ex0403dat <- read.fwf("C:\\biostat\\data\\ex0403.dat", width=c(8,8,8), col.names=c("subject","highfat","lowfat")) # Create a dataset (frame) from input data ex0403 <- data.frame(ex0403dat) # Attach the dataset for analysis attach(ex0403) # Conduct the Paired t-test on the differences highfat-lowfat (where highfat will be entered first) t.test(highfat,lowfat,paired=T) dev.off()