| nr_to_raster | R Documentation |
Convert native raster images to/from other R objects
nr_to_raster(nr)
raster_to_nr(ras, dst = NULL)
nr_to_array(nr)
array_to_nr(arr, dst = NULL)
nr |
native raster image |
ras |
standard R raster i.e. a character matrix of hex color values |
dst |
destination native raster image. If NULL (the default) a new |
arr |
3d numeric array representing R,G,B,A values with dimensions [nrow, ncol, 4] or [nrow, ncol, 3]. Each value is in range [0,1]. |
raster, array or native raster image
Other conversion functions:
magick_to_nr(),
matrix_to_nr(),
nrs_to_gif(),
nrs_to_mp4()
nr <- nr_new(12, 8, 'hotpink')
nr_to_raster(nr)
nr_to_array(nr)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.