r4fun: Launch R4VN Playground

View source: R/r4fun.R

r4funR Documentation

Launch R4VN Playground

Description

Starts a lightweight collection of short games, puzzles, and relaxation activities bundled with R4VN. The interface can be switched between English and Vietnamese. The function is intentionally independent of active data and statistical workflows.

Usage

r4fun(
  language = c("en", "vi"),
  launch.browser = TRUE,
  host = "127.0.0.1",
  port = NULL,
  ...
)

Arguments

language

Initial interface language. Use "en" for English or "vi" for Vietnamese.

launch.browser

Logical or a browser function passed to shiny::runApp().

host

Host passed to shiny::runApp(). The default "127.0.0.1" keeps the app local to the user's computer.

port

Optional port. NULL lets Shiny choose an available port.

...

Additional arguments passed to shiny::runApp().

Details

The Playground uses only the optional package shiny. Vietnamese interface strings are stored in Unicode escape form so the R source file remains ASCII-only and portable across locales. Games include a collapsible Trick section with a practical strategy or shortcut for easier play.

Value

Invisibly returns the value from shiny::runApp().

Examples

if (interactive() && requireNamespace("shiny", quietly = TRUE)) {
  r4fun()
}

R4VN documentation built on Sept. 30, 2026, 5:13 p.m.