-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Notebook format #395
Comments
I had a quick look at the way RStudio R Notebooks save the output. Here are the relevant files from the
The content of {"chunk_definitions":[{"chunk_id":"c68yx1b0064yu","expansion_state":0,"options":[],"row":11,"row_count":1,"visible":true},{"chunk_id":"ccw2gfveoholl","expansion_state":0,"options":[],"row":17,"row_count":1,"visible":true}],"doc_write_time":1597363618.19062} It seems logical but figuring out the details could take a while, as you say. I think the user should only need to know about the Rmd file. Having the 'actual' notebook be a JSON file sounds fine to me. I think it should be hidden from the user (e.g., saved in From https://bookdown.org/yihui/rmarkdown/notebook.html#saving-and-sharing 'The document’s chunk outputs are also stored in an internal RStudio folder beneath the project’s |
This issue is stale because it has been open for 365 days with no activity. |
This issue was closed because it has been inactive for 14 days since being marked as stale. |
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?
The text was updated successfully, but these errors were encountered: