Initial commit of v1.0 R code and documentation, together with examples and docs.