When running stats labs I like to allocate a slightly different subset of data to each student, which acts as an incentive for people to do their own work (rather than copying the same results from a fellow student). We also need to be able to replicate the results when marking, so we need a record of exactly which observations were dropped to create a particular data set. I have done this in a variety of ways, but this time I opted for code that looked like:
setwd('~/Dropbox/teaching/stat202-2012') biom <- read.csv('biom2012.csv', header = TRUE) drops <- read.csv('lab4-dels.csv', header = TRUE) # Use here your OWN student code my.drop <- subset(drops, student.code == 'mjl159') my.data <- subset(biom, !(id %in% my.drop))