## ----include = FALSE---------------------------------------------------------- knitr::opts_chunk$set( collapse = TRUE, comment = "#>", eval = FALSE # Don't actually run typeRun in vignette ) ## ----------------------------------------------------------------------------- # install.packages("typeR") ## ----------------------------------------------------------------------------- # # Install devtools package if not already installed # if (!requireNamespace("devtools", quietly = TRUE)) { # install.packages("devtools") # } # # # Install from GitHub # devtools::install_github("fgazzelloni/typeR") ## ----------------------------------------------------------------------------- # library(typeR) ## ----------------------------------------------------------------------------- # 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 # typeR("test_script.R", delay = 0.05) ## ----eval=FALSE--------------------------------------------------------------- # vignette("typerun-demo", package = "typeR")