pdf("ex0103.pdf") # Read in data from ASCII formatted (Fixed With File) ex0103dat <- read.fwf("http://www.stat.ufl.edu/~winner/data/biostat/ex0103.dat", width=c(8), col.names=c("creatclr")) # Create a dataset (frame) from input data ex0103 <- data.frame(ex0103dat) # Attach the dataset for analysis attach(ex0103) # Compute the mean for the variable meancrcl <- mean(creatclr) # Compute the standard deviation for the variable sdcrcl <- sd(creatclr) # Generate the Coefficient of Variation (as a percentage) cvcrcl <- (sdcrcl/meancrcl)*100 # Print the dataset ex0103 # Print the mean meancrcl # Print the standard deviation sdcrcl # Print the Coefficient of Variation cvcrcl dev.off()