Another Object Orientation System

Another implementation of object-orientation in R. It provides syntactic sugar for the S4 class system and two alternative new implementations. One is an experimental version built around S4 and the other one makes it more convenient to work with lists as objects.


Version 0.5.0

  • CRAN release
  • Replacing microbenchmark with rbenchmark package in vignette.

Version 0.4.0

  • CRAN release

Version 0.3.9

  • try handler for setClassUnion in type expressions.

Version 0.3.8

  • New function stripSelf to use retList without the attribute .self.

Version 0.3.7

  • Bugfix for roxygen2 parser functions. The formals of a S4 method have not been correctly identified.

Version 0.3.6

  • Bugfix in retList: make ".private" public was not possible.

Version 0.3.5

  • %m% now supports 'type expressions', i.e. the signature is expressed as 'varName ~ typeName'. Using '=' for specifying the signature is not supported anymore.
  • %type% supports 'type expressions', i.e. classes of slots can be expressed without default values in the type constructor.
  • type expressions: name ~ type, where a type is the unquoted name of a type / S4-Class or a class union of the form 'type1 | type2 [| ...]'

Version 0.3.4

  • The class Show is not a reference class anymore but an ordinary S4 class. This should not make a difference since it is virtual.

Version 0.3.3

  • Linking the interfaces to the S4 class system to the roxygen2 documentation facilities. It is now possible to document generics, methods and types in the same way as you would using only the methods package.
  • New functions parser_%m%, parser_%g% and parser_%type% to be used by roxygen2

Version 0.3.2

  • New wrapper around setClass: %types% to be used as a subset of S4 classes. It mimics the pattern of "setClass(...); setMethod("initialize", ...)" and captures most of the needed features.

Version 0.3.1

  • New wrappers (%g% and %m%) around setGeneric and setMethod from the methods package. They provide an alternative approach to define (S4) generic functions and methods putting an emphasis on readability.

Version 0.3.0

  • CRAN release

Version 0.2.6

  • Renaming Class -> defineRefClass

Version 0.2.5

  • retList: renamed argument 'exports' to 'public'.
  • Possible to define encapsulated unary operators.
  • Vignette on classes with reList.
  • Vignette on performance.

Version 0.2.4

  • retList has now an object called .self referring to itself.

Version 0.2.3

  • retList can now 'inherit' from another list. An extra argument superEnv can be used to really extend a class definition in this framework.
  • retList has new arguments to control inheritance.

Version 0.2.2

  • New classes Infix and Print which enable encapsulated definitions of infix operators and print methods for S3 classes.

Version 0.2.1

  • New functions retList and funNames to work with closures as objects

Version 0.2.0

  • CRAN release

Version 0.1.6

  • New class 'Binary' to add binary operators to aoos classes

Version 0.1.5

  • Bugfix when calling new/constructor without arguments
  • Inheritance of non-aoos classes - for S4 Method dispatch
  • update to summary method for aoos
  • New class 'Show' to easily override default show method for aoos classes
  • New class 'Accessor' to override the default accessor for aoos classes

Version 0.1.4

  • Bugfix in Class when constructing refClass with empty fields
  • Updated behaviour of aoos classes. Leading '.' indicates a private member, all other names refer to public member
  • New function private to declare a member to be private regardless of name
  • Initialise method for aoos classes now properly passes arguments to init, so new can be used for initialisation
  • Updated vignettes

Version 0.1.3

  • New class 'Private' to add restricted access to methods and fields of reference classes

Version 0.1.2

  • New function Class, which is a wrapper around setRefClass

Version 0.1.1

  • Bugfix when accessing reference objects.

Version 0.1.0

  • CRAN release

Version 0.0.6

  • Handling of fields inheriting from 'environment'

Version 0.0.5

  • Use the method public instead of publicFunction and publicValue
  • Renaming of class oom to aoos
  • Vignette: Introduction

Version 0.0.4

  • Can define function 'init' which will be called if arguments are supplied to the constructor.
  • defineClass has new side effect: S4 method for 'initialize'
  • defineClass lost side effect: constructor is not assigned to the class-name
  • Constructor functions can be named differnet from the class-name
  • S4-constructor 'new' can be used to create a new object

Version 0.0.3

  • Access self inside class definitions also for private objects.

Version 0.0.2

  • Inheritance: Replacing members of parent is possible.
  • Fix in package-tests, as there are some problems on CRAN.
  • class oom is now VIRTUAL.
  • summary method for oom.
  • modified show method.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.5.0 by Sebastian Warnholz, 4 years ago

Report a bug at

Browse source code at

Authors: Sebastian Warnholz [aut, cre]

Documentation:   PDF Manual  

MIT + file LICENSE license

Imports magrittr, utils, roxygen2

Depends on methods

Suggests testthat, knitr, rbenchmark, R6, rmarkdown

Imported by dat.

Depended on by saeRobust.

See at CRAN