Added working examples for every function. Passes CRAN check.