Skip to content

Wrong kernel for R files #120

Closed
Closed
@kiendang

Description

Issue

I'm not sure whether this is a jupyter or jupytext problem but jupyter doesn't set the correct kernel for .R files for me.

Steps to reproduce:

  • Create a blank .R file
  • Open the file in jupyter notebook

Problem

The kernel is set to the default kernel python3, not the one for R.

{
  "jupytext": {
    "metadata_filter": {
      "notebook": {
        "additional": [],
        "excluded": "all"
      },
      "cells": {
        "additional": [],
        "excluded": "all"
      }
    },
    "main_language": "R",
    "text_representation": {
      "extension": ".R",
      "format_name": "spin"
    }
  },
  "kernelspec": {
    "name": "python3",
    "display_name": "Python 3",
    "language": "python"
  },
  "language_info": {
    "name": "python",
    "version": "3.6.5",
    "mimetype": "text/x-python",
    "codemirror_mode": {
      "name": "ipython",
      "version": 3
    },
    "pygments_lexer": "ipython3",
    "nbconvert_exporter": "python",
    "file_extension": ".py"
  }
}

I have to change the kernel to R manually. This is the metadata after setting the correct kernel:

{
  "jupytext": {
    "metadata_filter": {
      "notebook": {
        "additional": [],
        "excluded": "all"
      },
      "cells": {
        "additional": [],
        "excluded": "all"
      }
    },
    "main_language": "R",
    "text_representation": {
      "extension": ".R",
      "format_name": "spin"
    }
  },
  "kernelspec": {
    "name": "ir",
    "display_name": "R",
    "language": "R"
  },
  "language_info": {
    "name": "R",
    "codemirror_mode": "r",
    "pygments_lexer": "r",
    "mimetype": "text/x-r-source",
    "file_extension": ".r",
    "version": "3.5.1"
  }
}

Is it possible to automatically use the R kernel for .R files?

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