| nr_new | R Documentation |
A native raster image in R looks like an integer matrix, but is interpreted differently by graphics devices:
nr_new(width, height, fill = "white")
nr_new_from(nr, fill = "white")
width, height |
Image dimensions in pixels |
fill |
Background fill color as a character string. Either a standard R color
(e.g. 'blue', 'white')
or a hex color of the form |
nr |
native raster image to use as the template for the size of the
new image in |
The data should be treated as RGBA pixels in row-major ordering
Each 32-bit integer should be interpreted as 4-bytes - one for each of the R, G, B and A color channels
native raster image
Other image creation functions:
nr_copy()
nr <- nr_new(400, 300, 'hotpink')
plot(nr)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.