View source: R/loonGrob_l_layer_scatterplot.R
tcl_img_2_r_raster | R Documentation |
Turn a tk image object to an R raster
object
tcl_img_2_r_raster(img)
img |
a tk image object |
if(requireNamespace("grid")) {
puglia <- list.files(file.path(find.package(package = 'loon'), "images"),
full.names = TRUE)[1L]
# `img` is a tk image object
img <- setNames(l_image_import_files(puglia),
tools::file_path_sans_ext(basename(puglia)))
raster <- tcl_img_2_r_raster(img)
grid::grid.newpage()
grid::grid.raster(raster)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.