plot_vector: Plot the raw vector as an image in the RStudio Viewer.

View source: R/helper_functions.R

plot_vectorR Documentation

Plot the raw vector as an image in the RStudio Viewer.

Description

Helper function to plot the raw vector as an image in the RStudio Viewer pane (or another configured browser) using the magick package.

Usage

plot_vector(raw_vector, height_px = NULL, width_px = 550)

Arguments

raw_vector

The raw vector object in R which you wish to plot.

height_px

The width in pixels to scale the image before viewing. To ensure the correct aspect ratio is maintained when specifying height, set width_px = NULL.

width_px

The width in pixels to scale the image before viewing.

Value

A printable magick tibble.

Examples

## Not run: 
  glitch_it(demo_img1, method = "far",
            n_changes = 3, tune = 5) %>%
  plot_vector(width_px = 300)

## End(Not run)

pj398/glitchr documentation built on Aug. 18, 2022, 7:36 a.m.