MyNixOS website logo
Description

Extension for 'R6' Base Class.

Useful methods and data fields to extend the bare bones 'R6' class provided by the 'R6' package - ls-method, hashes, warning- and message-method, general get-method and a debug-method that assigns self and private to the global environment.



Status

Travis-CI BuildStatus codecov CRANversion

Extension for ‘R6’ Base Class



Version

0.1.2
2018-01-14



Description

Useful methods and data fields to extend the bare bones ‘R6’ class provided by the ‘R6’ package - ls-method, hashes, warning- and message-method, general get-method and a debug-method that assigns self and private to the global environment.



License

MIT + file LICENSE
Peter Meissner [aut, cre]



Citation

To cite package ‘r6extended’ in publications use:

Peter Meissner (2019). r6extended: Extension for ‘R6’ Base Class. R package version 0.1.2. https://github.com/petermeissner/r6extended

A BibTeX entry for LaTeX users is

@Manual{, title = {r6extended: Extension for ‘R6’ Base Class}, author = {Peter Meissner}, year = {2019}, note = {R package version 0.1.2}, url = {https://github.com/petermeissner/r6extended}, }



BibTex for citing

@Manual{, title = {r6extended: Extension for ‘R6’ Base Class}, author = {Peter Meissner}, year = {2019}, note = {R package version 0.1.2}, url = {} </code



Installation

stable version from CRAN

install.packages("r6extended")
devtools::install_github("petermeissner/r6extended")



Example Usage



… starting up …

library(r6extended)

new instance

ext <- r6extended$new()

whats there?

ext$ls()
##        name   where    class
## 1      hash private function
## 2    hashed private function
## 3    hashes private     list
## 4     clone    self function
## 5     debug    self function
## 6       get    self function
## 7   hash_do    self function
## 8  hash_get    self function
## 9        ls    self function
## 10  message    self function
## 12  warning    self function
## 11  options    self     list

getting things (wherever they are, also private stuff)

ext$get("options")
## $verbose
## [1] TRUE
## 
## $warning
## [1] TRUE
ext$get("hashes")
## list()

messages

ext$message("Please note ...")
## r6extended : Please note ...
ext$options$verbose <- FALSE
ext$message("Please note ...")

build in hashing

ext$hash_do()
ext$hash_get("options")
## [1] "feb524178c59d96d"

debugging

ext$debug()

private$hash()
## $hash
## [1] "a2145d8a65aed2fd"
## 
## $hashed
## [1] "6ddac4b4cd8556db"
## 
## $hashes
## [1] "192f75af59696813"
## 
## $clone
## [1] "11f7a5b9d5763be9"
## 
## $debug
## [1] "3f1f72468b467261"
## 
## $get
## [1] "31fd6f69e480adaa"
## 
## $hash_do
## [1] "236b962b10c0eb01"
## 
## $hash_get
## [1] "bdc96d1de6eea991"
## 
## $ls
## [1] "d18ce6a302986879"
## 
## $message
## [1] "0eb0aed48eca3590"
## 
## $warning
## [1] "c30df76f92169fbd"
## 
## $options
## [1] "feb524178c59d96d"
self$ls()
##        name   where    class
## 1      hash private function
## 2    hashed private function
## 3    hashes private     list
## 4     clone    self function
## 5     debug    self function
## 6       get    self function
## 7   hash_do    self function
## 8  hash_get    self function
## 9        ls    self function
## 10  message    self function
## 12  warning    self function
## 11  options    self     list
Metadata

Version

0.1.2

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows