Skip to content

canmod/oor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lightweight Tools for Object Oriented Programming

R-CMD-check

Why?

Many object oriented programming frameworks exist for R, so why another? I wanted minimal magic, to develop a very solid understanding and use of basic R concepts (e.g. environments), and to have no dependencies on third-party packages.

Installation

To install the development version please use this.

remotes::install_github("canmod/oor")

To install the stable version please use this.

install.packages("oor", repos = "https://canmod.github.io/drat", type = "source")

Roadmap

We intend for this to be a very stable and simple package. To get to this point, the roadmap consists of the following two items that we hope will never change.

  1. Remove or simplify the complexities of traits and other fancy types of inheritance.
  2. Test

Hello world

Printer = function(x) {
  self = Base()
  self$.x = x
  self$print = function() print(self$.x)
  return_object(self, "Printer")
}
printer = Printer("something to print")
printer$print()

SupportivePrinter = function(x) {
  self = Printer(x)
  self$print = function() {
    print(paste(sQuote(self$.x), "is a very nice thing to say"))
  }
  return_object(self, "Supportive")
}
supportive_printer = SupportivePrinter("something to print")
supportive_printer$print()

About

No description, website, or topics provided.

Resources

License

Unknown, GPL-3.0 licenses found

Licenses found

Unknown
LICENSE
GPL-3.0
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages