Giter Club home page Giter Club logo

rkernel's Introduction

RKernel

This is a re-creation from scratch of an R kernel for Jupyter.

A demonstration of interactive distribution plots

To install run the following lines in R:

devtools::install_github("melff/RKernel/pkg")
RKernel::installspec()

For dynamic help you also need to install the python package jupyter-server-proxy.

This kernel differs from the already existing IRKernel by:

  • Users can decide whether objects of certain classes are output via the "stdout" stream - which allows using any dedicated print()-methods or via rich HTML/LaTeX output. By default the "stdout" stream is used for most classes of objects. Classes can be designated for rich output by calling add_displayed_classes("some class"). For individual objects, rich output can be requested using display(some.object).

  • Users can decide wether an error or calling stop() leads to the termination of a notebook run or whether the succeeding notebook cells will be run. (This may be useful for teaching with notebooks.) Whether an error of stop() leads to an notebook abort can be controlled by the option rkernel_stop_on_error.

  • Error and warning messages appear via the stderr stream, ordinary messages (created by message()) appear via the stdout stream. Consequently, "ordinary" messages (e.g. that appear while a package is loaded via library()) are less obtrusive, while error messages clearly stand out.

  • Graphics can be "updated", so that e.g. curve(gamma(x),add=TRUE) works as expected even if the plot to which the curve is added has been created by code in a previous cell.

  • It is based on the R6 package instead of S4 reference classes.

  • Links in help pages work. To this purpose, help pages are not paged, but included into the notebook. This also allows to show several help pages in the notebook. Also help.start() now works. HTML help is shown using jupyter-server-proxy

  • The polling loop allows for providing services e.g. with the "htmluv" package.

  • It is possible to make use of the Widgets infrastructure provided by ipywidgets to constructed interactive user interfaces. These can be used with jupyter notebooks, JupyterLab and voilà. ipywidgets are supported up to version 8.0.

  • HTML widgets generally work. However, some htmlwidgets (notably those created with plotly) displayed with the setting options(htmlwidgets_embed=TRUE) however to not appear if the notebook is opened in Google Chrome.

  • There is also a support for virtual table display (based on the ipywidget infrastructure).

A demonstration of some display facilities

Some demonstration notebooks can be found here.

A widget demonstration can be found here.

TODO:

  • Add documentation
  • Make HTML help work on servers
  • Add example notebooks
  • Make HTML widgets work more generally

rkernel's People

Contributors

melff avatar kevinmhadi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.