source_jupyter: Source a jupyter notebook

View source: R/jupyter-utils.R

source_jupyterR Documentation

Source a jupyter notebook

Description

convert a jupyter notebook to R using jupytext and source it. Jupytext must be installed and available in the path

Usage

source_jupyter(
  file,
  outdir = NULL,
  jupytext_path = "jupytext",
  source_file = TRUE
)

Arguments

file

path to the jupyter notebook

outdir

directory to store the converted R file. By default the file would be created in the same directory as the jupyter notebook

jupytext_path

path to jupytext executable

source_file

if FALSE, and .R file is created but not sourced

Value

None

Examples

## Not run: 
# 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())

## End(Not run)


tanaylab/tgutil documentation built on March 16, 2024, 12:07 a.m.