typos, extra white space, knitr option

typo: focusses -> focuses
extra space removed
typo: this chapter discuss -> discusses
typo: four types of environment -> environments
knitr option "error = TRUE" added