R object oriented programming