Learn R Programming

grobblR (version 0.2.2)

grob_image: Grob Image

Description

Initialize a grob image object, to be used within grob_col.

Usage

grob_image(x)

Value

An R6 object of the grob image class.

Arguments

x

Either a ggplot object, a file path to .png image or a URL to a .png image.

Examples

Run this code

gg = data.frame(x = c(5, 14, 6, 10), y = c(3, 30, 17, 7)) %>%
  ggplot2::ggplot(mapping = ggplot2::aes(x = x, y = y)) +
  ggplot2::geom_line(color = 'red') 
  
gg %>%
  grob_image() %>%
  view_grob()

Run the code above in your browser using DataLab