Learn R Programming

mmibain (version 0.2.0)

render_card_grid: Render Card Grid for Shiny App

Description

This internal helper function is used to render a grid of card images in the RepliCrisis Shiny application. It takes a matrix representing the card grid and converts it into a Shiny UI layout with card images.

Usage

render_card_grid(new_card_grid)

Value

Returns a Shiny UI object that contains a rendered grid of card images.

Arguments

new_card_grid

A matrix where each entry is a list representing a card, including information needed to render the card image.

Details

The function iterates over each row of the new_card_grid matrix to render the card images using Shiny's renderImage function. It then constructs a UI layout using fluidRow and column to display the images in a grid format suitable for a Shiny application.

The images are sourced from the mmibain package and are assumed to be PNG files that are formatted and named in a way that is compatible with the system.file function used to locate them.

See Also

renderImage, fluidRow, and column for details on the Shiny functions used to render images and construct the UI layout.