Movatterモバイル変換


[0]ホーム

URL:


Q7

Lifecycle: experimentalTravis build status

Q7 is a type system that enables a postmodern flavor of compositionalobject-oriented programming (OOP). It is simple, flexible and promoteshealthy program design.

Q7 features:

Installation

# install.packages("devtools")devtools::install_github("iqis/Q7")
require(Q7)#> Loading required package: Q7#> Loading required package: magrittr#>#> Attaching package: 'Q7'#> The following object is masked from 'package:base':#>#>     merge

Example

Make a Q7 object in 3 easy steps.

1, Define an object type:

Adder<-type(function(num1, num2){    add_nums<-function(){        num1+ num2    } })

2, Instantiate the object:

myAdder<-Adder(1,2)

3, Enjoy!

myAdder$add_nums()#> [1] 3

See vignettes for extending an object and other topics.


[8]ページ先頭

©2009-2025 Movatter.jp