Design Patterns in R to build reusable object-oriented software