first draft of R package with personal convenience functions.