The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.
typeRun() is an enhanced version of typeR()
that not only simulates typing animation but also executes your
R code in real-time. This makes it perfect for:
The most basic usage is to run an R script with typing animation and live execution:
# Create a simple script
cat("# Data Analysis Demo
x <- 1:10
mean(x)
sum(x)
", file = "demo.R")
# Type and execute it
typeRun("demo.R")What youβll see: - Code types out character by character - Each line executes as itβs typed - Results appear immediately after each command
cat("
# Linear regression
model <- lm(mpg ~ hp + wt, data = mtcars)
summary(model)
", file = "model_demo.R")
typeRun("model_demo.R")What happens: - model <- lm(...)
executes silently (no output) - summary(model) displays the
full summary with coefficients, R-squared, etc.
typeRun() handles all model types intelligently:
During execution, you have full control:
Enter choice (1 resume or 2 stop):This is perfect for: - Answering questions during presentations - Explaining specific code sections - Debugging during demonstrations
typeRun() intelligently handles .Rmd
files:
Behavior: - β Types and shows all text - β Executes only R code chunks - β Skips YAML headers - β Preserves narrative flow
Run code in an isolated environment to keep your workspace clean:
Package loading messages are automatically suppressed:
cat("
library(ggplot2) # No startup message shown
library(dplyr) # Clean output
# But code works normally
mtcars %>% head()
", file = "packages.R")
typeRun("packages.R")
# Shows only the actual results, not package messagesThese donβt produce output (cleaner demos):
cat("
# Load data
data(mtcars)
head(mtcars, 3)
# Visualize relationship
plot(mtcars$hp, mtcars$mpg,
xlab = 'Horsepower',
ylab = 'Miles per Gallon',
main = 'MPG vs Horsepower')
# Fit model
model <- lm(mpg ~ hp, data = mtcars)
summary(model)
# Add regression line
abline(model, col = 'red', lwd = 2)
# Predictions
new_data <- data.frame(hp = c(100, 150, 200))
predict(model, new_data)
", file = "teaching_demo.R")
typeRun("teaching_demo.R", delay = 0.08)cat("
# 1. Load and explore
data <- iris
str(data)
# 2. Summary statistics
summary(data)
# 3. Visualization
boxplot(Sepal.Length ~ Species, data = data,
main = 'Sepal Length by Species',
col = c('lightblue', 'lightgreen', 'pink'))
# 4. Statistical test
aov_result <- aov(Sepal.Length ~ Species, data = data)
summary(aov_result)
# 5. Post-hoc test
TukeyHSD(aov_result)
", file = "analysis_demo.R")
typeRun("analysis_demo.R", delay = 0.06, max_print = 8)cat("
# Binary outcome: Manual transmission (am)
# Predictors: HP and weight
# Fit logistic regression
logit_model <- glm(am ~ hp + wt,
data = mtcars,
family = binomial(link = 'logit'))
# Model summary
summary(logit_model)
# Odds ratios
exp(coef(logit_model))
# Predicted probabilities
mtcars$pred_prob <- predict(logit_model, type = 'response')
head(mtcars[, c('am', 'hp', 'wt', 'pred_prob')])
", file = "glm_example.R")
typeRun("glm_example.R", max_print = 6)Before presenting:
| Feature | typeR() |
typeRun() |
|---|---|---|
| Typing animation | β | β |
| Code execution | β | β |
| Shows output | β | β |
| Interactive pause/resume | β | β |
| Output truncation | β | β |
| Custom environment | β | β |
| Model summary handling | N/A | β |
| Library message suppression | N/A | β |
?typeR - Basic typing animation without execution?typeRun - Full function documentationThese binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.