Writes the page that view_card() shows in the Viewer. An SVG card goes into the
page itself, so that each column and bar tells its value when you point at it. A PNG card goes
next to the page, which shows it at half its width in pixels, the width of the card, since the
card functions draw a PNG with twice as many pixels. Either shrinks to fit a narrower pane.
Arguments
- source
The card, as
card_source()returns it.
Details
The page goes into a new folder of the temporary folder of R, the only place the Viewer of RStudio shows pages from.
Examples
rghcard:::card_page(rghcard:::card_source(stats_card(example_stats(), file = NULL)))
#> [1] "/tmp/RtmpQs5xEH/rghcard-1d7743bde57/index.html"