Added some documentation and pasted the methods.R code from Rpubs into methods.R in R/