View source: R/save_promo_image.R
save_promo_image | R Documentation |
save_promo_image()
saves a promo image of a game.
This is usually just a starting diagram for the game but
sometimes we may create a custom image.
save_promo_image(game, gk = game_kit(), file = NULL, ...)
game |
Game name. Will be normalized by |
gk |
A |
file |
Filename for the image. If |
... |
Passed to |
If we haven't created a custom image for this game then basically
we'll convert the game name to snake case, prepend a "df_"
in front and then dynGet()
a function with that name and use
the resulting data frame with piecepackr::render_piece()
.
See df_game for list of games directly supported by this package.
A list with the width, height, and filename of the promo image. As a side effect we save an image to disk.
file <- tempfile(fileext = ".pdf")
whf <- save_promo_image("Fuji-san", gk = game_kit(), file = file)
print(whf)
unlink(whf$file)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.