bootstrap is a fairly flexible function, and can be called with
  or without arguments newdata and newenv.
If called with only object specified, then bootstrap estimates
  for the training set data are returned. In this case, the returned
  object will not include component predictions.
If called with both object and newdata, then in addition
  to the above, bootstrap estimates for the new samples are also
  calculated and returned. In this case, component predictions
  will contain the apparent and bootstrap derived predictions and
  sample-specific errors for the new samples.
If called with object, newdata and newenv, then
  the full bootstrap object is returned (as described in the
  Value section below). With environmental data now available for the
  new samples, residuals, RMSE(P) and \(R^2\) and bias statistics can
  be calculated.
The individual components of predictions are the same as those
  described in the components relating to the training set data. For
  example, returned.object$predictions$bootstrap contains the
  components as returned.object$bootstrap.
It is not usual for environmental data to be available for the new
  samples for which predictions are required. In normal
  palaeolimnological studies, it is more likely that newenv will
  not be available as we are dealing with sediment core samples from the
  past for which environmental data are not available. However, if
  sufficient training set samples are available to justify producing a
  training and a test set, then newenv will be available, and
  bootstrap can accomodate this extra information and calculate
  apparent and bootstrap estimates for the test set, allowing an
  independent assessment of the RMSEP of the model to be performed.
  
Typical usage of residuals is
    resid(object, which = c("model", "bootstrap"), \dots)