MyNixOS website logo
Description

Simulate Typing Script.

Simulates typing of R script files for presentations and demonstrations. Provides character-by-character animation with optional live code execution. Supports R scripts (.R), R Markdown (.Rmd), and Quarto (.qmd) documents.

typeR

R-CMD-check

CRAN status CRAN downloads

typeR is an R package that simulates typing effects on R script files, making it ideal for live coding presentations, interactive teaching, or creating animations. It supports R scripts, R Markdown, and Quarto presentations (including reveal.js slides).

Installation

# Install from CRAN
install.packages("typeR")

# Or get development version

# Install devtools if you don't already have it
install.packages("devtools")

devtools::install_github("Fgazzelloni/typeR")

Usage

Basic R Scripts

Here's an example of how to use the typeR package:

library(typeR)

# Create a test script for demonstration
writeLines(c(
  "# Testing typeR",
  "x <- 1:10",
  "y <- x*2",
  "plot(x, y)"
), "test_script.R")

# Simulate typing the script (display only)
typeR("test_script.R", delay = 0.05)

# Type AND execute the code
typeRun("test_script.R", delay = 0.05)

Quarto Presentations

Perfect for live coding in presentations! Works seamlessly with Quarto reveal.js slides:

# Use the included example presentation
demo_file <- system.file("examples/demo-presentation.qmd", package = "typeR")
typeRun(demo_file)

# Or create your own Quarto presentation
typeRun("my-presentation.qmd", delay = 0.08, max_print = 5)

See the Quarto Presentations vignette for detailed examples and best practices.

Features

  • Typing Animation: Simulates realistic typing of R code character by character
  • Live Execution: typeRun() executes code in real-time as it types
  • Multiple Formats: Supports .R, .Rmd, and .qmd (Quarto) files
  • Quarto Presentations: Perfect for reveal.js slides and other Quarto formats
  • Interactive Control: Press ESC to pause, then resume or stop
  • Smart Output: Handles plots, models, and long outputs intelligently
  • Customizable Speed: Adjust delay and jitter for natural typing rhythm
  • Teaching-Friendly: Ideal for courses, workshops, and conference presentations

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

License

This package is licensed under the MIT License. See the LICENSE file for details.

Metadata

Version

0.2.1

License

Unknown

Platforms (78)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-uefi
  • x86_64-windows