convert a jupyter notebook to R using jupytext and source it. Jupytext must be installed and available in the path
source_jupyter(
file,
outdir = NULL,
jupytext_path = "jupytext",
source_file = TRUE
)
path to the jupyter notebook
directory to store the converted R file. By default the file would be created in the same directory as the jupyter notebook
path to jupytext executable
if FALSE, and .R file is created but not sourced
None
if (FALSE) {
# notebook.R is created in the same directory as notebook.ipynb
source_jupyter("notebook.ipynb")
# notebook.R is created in a temp directory
source_jupyter("notebook.ipynb", outdir = tempdir())
}