Rotate a native raster image by 90,180,270 degrees

nr_rotate(nr, angle)

Arguments

nr

native raster image

angle

one of 0,90,180,270

Value

Invisibly return the supplied native raster image which was been modified in-place

See also

Other transformation functions: nr_fliph(), nr_flipv(), nr_transpose()

Examples

nr <- nr_new(20, 10, 'hotpink')
dim(nr)
#> [1] 10 20
nr_rotate(nr, 90)
dim(nr)
#> [1] 20 10