Skip to content

Running an R kernel #9

@louisaslett

Description

@louisaslett

I've seen R successfully used on some fabulous sites building off Juniper such as https://noamross.github.io/gams-in-r-course/ However, I would like to use Juniper outside of the spaCy course framework, so am trying to use the juniper.min.js file directly and embed in the framework I'm using.

However, even with the most basic test file I can't seem to get it to use an R language kernel. Just to get started, I'm using the existing Binder build at ines/course-starter-r so that I can eliminate that as a problem. So, based on the attributes for repo/branch/kernelType/language at https://github.com/ines/course-starter-r/blob/master/meta.json I'm trying this:

<html>
  <head>
    <title>Juniper with R</title>
  </head>
  <body>

<pre data-executable>
x <- rnorm(10)
mean(x)
x
</pre>

<script src="juniper.min.js"></script>
<script>new Juniper({
    repo: 'ines/course-starter-r',
    branch: 'binder',
    kernelType: 'ir',
    language: 'r'
})</script>

  </body>
</html>

However, when I run, I get errors which show that the code has been run through the Python interpreter, not R. Any guidance would be massively appreciated as I can't understand what I'm doing wrong.

Thanks,

Louis

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions