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.
render_card_grid(new_card_grid)Returns a Shiny UI object that contains a rendered grid of card images.
A matrix where each entry is a list representing a card, including information needed to render the card image.
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.
renderImage, fluidRow, and column
for details on the Shiny functions used to render images and construct the UI layout.