hesa
March 10, 2025
This presentation introduces the “Simple Shiny Calculator,” a Shiny application built in R. The app allows users to input a number and calculate its square, demonstrating basic interactivity using Shiny.
The Simple Shiny Calculator has the following features:
The app is built with two files: ui.R
for the user
interface and server.R
for the server logic.
You can interact with the Simple Shiny Calculator at the following link:
The app leverages Shiny’s reactive framework:
ui.R
): Defines a
fluidPage
layout with a numericInput
, an
actionButton
, and a textOutput
.server.R
): Uses
observeEvent
to detect button clicks, calculates the square
of the input, and renders the result with renderText
.This structure ensures the app is modular and easy to maintain.
The Simple Shiny Calculator demonstrates how Shiny can create interactive web applications in R with minimal code. It’s a starting point for more complex apps, such as adding multiple calculations or visualizations.