Skip to content

Notebook format #395

@renkun-ken

Description

@renkun-ken

As I'm trying to implement the R Notebook using the Notebook API at #394 initiated by #378, the first question is

What is the format of R Notebook in VSCode?

From the perspective of API, we could read any file into a collection of markdown cells and R code cells. Currently, https://github.com/Ikuyadeu/vscode-R/pull/394/files#diff-896fa9128d2e83307ffcf26741d257d2R142-R212 implements a simple line-by-line reader from Rmd file. All R code chunks are treated as R code cells, and others are treated as markdown cells.

The Rmd format is easy to read and write but it does not store output inside the file. I've tried R Notebook in RStudio and I don't have time to investigate how it could recover the output when I open an R Notebook from a Rmd file.

As most VSCode Notebook examples implement, the notebook is a JSON file of all cells and metadata, which could preserve all information in a notebook including cells and outputs.

I'm wondering if we should also implement R Notebook as a JSON file to achieve this, and preserve the capability of reading/writing Rmd as a Notebook but does not preserve outputs?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions