\begin{Schunk}
\begin{Sinput}
 options(digits=2)
 if (!file.exists("examples")) dir.create("examples")
 if (!file.exists("examples/titanic.txt"))
  download.file("http://lib.stat.cmu.edu/S/Harrell/data/ascii/titanic.txt", "examples/titanic.txt")
 titanic <- read.table("examples/titanic.txt", sep = ',', header = TRUE)
 titanic0 <- titanic
 save(titanic0, file="examples/titanic0.rda")
 set.seed(4321)
 titanic$sex[sample(nrow(titanic), 10)] <- NA 
 titanic$pclass[sample(nrow(titanic), 10)] <- NA 
 titanic$survived[sample(nrow(titanic), 10)] <- NA
\end{Sinput}
\end{Schunk}
