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 Build Status codecov CRAN version



Version

0.1.1
2018-01-13



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 (2018). r6extended: Extension for 'R6' Base Class. R package version 0.1.1. https://github.com/petermeissner/r6extended

A BibTeX entry for LaTeX users is

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



BibTex for citing

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



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()
## 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] "42078a201f5e24a5"
## 
## $hashed
## [1] "d5ca4f787e0a277f"
## 
## $hashes
## [1] "567e62ae3bc0e44c"
## 
## $clone
## [1] "67a8a922d6ccd800"
## 
## $debug
## [1] "e819bf58e0805ebd"
## 
## $get
## [1] "060d28eb014cd69a"
## 
## $hash_do
## [1] "70ff4316a3b558ae"
## 
## $hash_get
## [1] "2a51cba60cbca45f"
## 
## $ls
## [1] "7e20b2042d838c4c"
## 
## $message
## [1] "bee0bc8b45c29d04"
## 
## $warning
## [1] "ca5ab19c41b317a6"
## 
## $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

News

NEWS r6extended

version 0.1.1 // 2018-01-13 ...

  • first CRAN realease

version 0.1.0 // 2016-09-01 ...

  • BUGFIXES

  • FEATURE

    • rtext_extended
  • Development

Reference manual

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

install.packages("r6extended")

0.1.2 by Peter Meissner, 5 days ago


https://github.com/petermeissner/r6extended


Report a bug at https://github.com/petermeissner/r6extended/issues


Browse source code at https://github.com/cran/r6extended


Authors: Peter Meissner [aut, cre]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports R6, magrittr, digest, hellno

Suggests testthat, knitr, rmarkdown, covr


Imported by crossword.r.


See at CRAN