-
Notifications
You must be signed in to change notification settings - Fork 393
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for code cell metadata in Markdown format
- Loading branch information
Showing
13 changed files
with
173 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
tests/notebooks/mirror/ipynb_to_md/Notebook_with_R_magic.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
jupyter: | ||
kernelspec: | ||
display_name: Python 2 | ||
language: python | ||
name: python2 | ||
--- | ||
|
||
# A notebook with R cells | ||
|
||
This notebook shows the use of R cells to generate plots | ||
|
||
```python | ||
%load_ext rpy2.ipython | ||
``` | ||
|
||
```R | ||
suppressMessages(require(tidyverse)) | ||
``` | ||
|
||
```R | ||
ggplot(iris, aes(x = Sepal.Length, y = Petal.Length, color=Species)) + geom_point() | ||
``` | ||
|
||
The default plot dimensions are not good for us, so we use the -w and -h parameters in %%R magic to set the plot size | ||
|
||
```R magic_args="-w 400 -h 240" | ||
ggplot(iris, aes(x = Sepal.Length, y = Petal.Length, color=Species)) + geom_point() | ||
``` |
26 changes: 26 additions & 0 deletions
26
tests/notebooks/mirror/ipynb_to_md/Notebook_with_more_R_magic_111.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
jupyter: | ||
kernelspec: | ||
display_name: Python 3 | ||
language: python | ||
name: python3 | ||
--- | ||
|
||
```python | ||
%load_ext rpy2.ipython | ||
import pandas as pd | ||
|
||
df = pd.DataFrame( | ||
{ | ||
"Letter": ["a", "a", "a", "b", "b", "b", "c", "c", "c"], | ||
"X": [4, 3, 5, 2, 1, 7, 7, 5, 9], | ||
"Y": [0, 4, 3, 6, 7, 10, 11, 9, 13], | ||
"Z": [1, 2, 3, 1, 2, 3, 1, 2, 3], | ||
} | ||
) | ||
``` | ||
|
||
```R magic_args="-i df" | ||
library("ggplot2") | ||
ggplot(data = df) + geom_point(aes(x = X, y = Y, color = Letter, size = Z)) | ||
``` |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
jupyter: | ||
kernelspec: | ||
display_name: Python 3 | ||
language: python | ||
name: python3 | ||
--- | ||
|
||
```python | ||
# This is an unfrozen cell. Works as usual. | ||
print("I'm a regular cell so I run and print!") | ||
``` | ||
|
||
```python deletable=false editable=false run_control={"frozen": true} | ||
# This is an frozen cell | ||
print("I'm frozen so Im not executed :(") | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
tests/notebooks/mirror/ipynb_to_md/sample_rise_notebook_66.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
jupyter: | ||
kernelspec: | ||
display_name: Python 3 | ||
language: python | ||
name: python3 | ||
--- | ||
|
||
A markdown cell | ||
|
||
```python slideshow={"slide_type": ""} | ||
1+1 | ||
``` | ||
|
||
Markdown cell two |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.