Opens an interactive Shiny application for exploring the surreal algorithm. The app allows you to generate datasets with hidden images in residual plots using demo data, custom text, or uploaded images.
Arguments
- launch.browser
Logical. If
TRUE(default), opens the app in the default web browser. IfFALSE, returns the app URL for manual opening.- port
Integer. The port to run the app on. If
NULL(default), Shiny will choose an available port.- host
Character. The host address. Default is
"127.0.0.1"(localhost).
Value
This function is called for its side effect of launching the Shiny app. It does not return a value.
Details
The app provides:
Demo datasets (Jack-o-Lantern, R Logo)
Custom text input to embed messages in residual plots
Image upload support (PNG, JPEG, BMP, TIFF, SVG)
Interactive controls for R², predictors, and image processing settings
Dark/light mode toggle
Data export to CSV
Requirements
The app requires the shiny and bslib packages to be installed. For image uploads, additional packages may be needed depending on the format:
JPEG: jpeg
BMP: bmp
TIFF: tiff
SVG: rsvg
See also
surreal() for the core algorithm.
surreal_text() for embedding text programmatically.
surreal_image() for processing images programmatically.