library( dataWorkshop)
## Loading required package: maps
## 
##  # ATTENTION: maps v3.0 has an updated 'world' map.        #
##  # Many country borders and names have changed since 1990. #
##  # Type '?world' or 'news(package="maps")'. See README_v3. #
## 
## 
## Loading required package: fields
## Loading required package: spam
## Loading required package: grid
## Spam version 1.3-0 (2015-10-24) is loaded.
## Type 'help( Spam)' or 'demo( spam)' for a short introduction 
## and overview of this package.
## Help for individual functions is also obtained by adding the
## suffix '.spam' to the function name, e.g. 'help( chol.spam)'.
## 
## Attaching package: 'spam'
## 
## The following objects are masked from 'package:base':
## 
##     backsolve, forwardsolve
Bolder<-  read.table( "BB200.txt", header=TRUE, skip=2)

convertTime<- function(tt){
  tt <- as.character(tt)
  m<- nchar( tt)
  mn<- substr(tt,1, m-3)
  sec<- substr(tt,m-1,m)
  mn<- as.numeric( mn)
  sec<- as.numeric( sec)
  return( mn + sec/60)
  
}

BolderN<- na.omit(Bolder)

for(  k in (6:13) ){
  BolderN[,k]<- convertTime(BolderN[,k])
}

fitA<- lm(PLACE ~ MILE1 , data=BolderN)

fitB <- lm( PLACE ~ MILE1 + MILE6,  data=BolderN)

plot(fitB)

set.panel(1,2)
## plot window will lay out plots in a 1 by 2 matrix
plot(BolderN$MILE1, fitB$residuals)
plot(BolderN$MILE6, fitB$residuals)