render_card_grid | R Documentation |
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)
new_card_grid |
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.
Returns a Shiny UI object that contains a rendered grid of card images.
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.
renderImage
, fluidRow
, and column
for details on the Shiny functions used to render images and construct the UI layout.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.