Package 'REPLesentR'

Title: Presentations in the REPL
Description: Create presentations and display them inside the R 'REPL' (Read-Eval-Print loop), aka the R console. Presentations can be written in 'RMarkdown' or any other text format. A set of convenient navigation options as well as code evaluation during a presentation is provided. It is great for tech talks with live coding examples and tutorials. While this is not a replacement for standard presentation formats, it's old-school looks might just be what sets it apart. This project has been inspired by the 'REPLesent' project for presentations in the 'Scala' 'REPL'.
Authors: Sebastian Warnholz [aut, cre]
Maintainer: Sebastian Warnholz <[email protected]>
License: MIT + file LICENSE
Version: 0.4.0
Built: 2025-01-31 02:53:30 UTC
Source: https://github.com/wahani/replesentr

Help Index


Evaluation Module

Description

This module knows how to evaluate code on a slide. It has two methods: 'slide' and 'slideDeck' consuming either a Slide or SlideDeck. You do not need to use this interactively: see newPresentation.

Usage

Evaluate(envir = .GlobalEnv, quiet = FALSE)

Arguments

envir

(environment) the environment in which to evaluate.

quiet

(logical) whether to print the code being evaluated prior to evaluation.


Create a new presentation

Description

Creates a new instance of a presentation. Currently it has only one method: start which is called without any arguments. It starts a presentation or resumes where you left off. A presentation runs inside your R console and the idea is to maximize the window on your screen for a presentation mode.

Usage

newPresentation(fileName, width = NULL, height = NULL, border = "*",
  padding = 1, slideSep = rep("", 3))

introPresentation()

Arguments

fileName

(character) the file containing the presentation. Currently one of: .Rmd, md, or plain.

width

(integer) the number of columns to use. By default: options('width').

height

(integer) the number of rows to use. By default set to 22.

border

(character) the character used as a border to frame a single slide.

padding

(integer) the number of white-spaces / empty rows between border and content.

slideSep

(character) the slide separator: how to determine a 'slide break'.

Details

To convert from Rmd to md formats knitr::knit is used. To convert from md to plain knitr::pandoc(file, format = "plain") is used. If you want to configure the process of this conversion please see the documentation of these two functions.

For navigation inside the presentation mode, please see the examples below. Or start a presentation and type 'h' for help.

Value

The function returns an instance of the presentation. It has only one method: start without any arguments. start will start the presentation and also resume where you left.

Examples

## Not run: 
## Start with the example:
introPresentation() # in presentation mode type 'h'

## The same presentation but with manual configuration:
file <- system.file("Introduction.Rmd", package = "REPLesentR")
myPresentation <- newPresentation(
  file, width = 80, height = 23, border = "O", padding = 1)
myPresentation$start()

## End(Not run)

Read Module

Description

Read creates a new module with one method: 'auto'. This method selects an appropriate procedure for reading in the content of the file depending on the file extension. It should not be necessary to call this function interactively, please go to the docs for newPresentation.

Usage

Read()

See Also

newPresentation