render_card_grid {mmibain} | R Documentation |
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)
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.
Value
Returns a Shiny UI object that contains a rendered grid of card images.
Note
This function is an internal helper specifically designed for the RepliCrisis
Shiny application. It relies on the structure of the new_card_grid
being
consistent with expected input and the mmibain
package for card images.
See Also
renderImage
, fluidRow
, and column
for details on the Shiny functions used to render images and construct the UI layout.