x3p_rotate: Rotate an x3p object

Description Usage Arguments Examples

View source: R/rotate_x3p.R

Description

Rotate the surface matrix of an x3p object. Also adjust meta information.

Usage

1
2
3
x3p_rotate(x3p, angle = 90)

rotate_x3p(x3p, angle = 90)

Arguments

x3p

x3p object

angle

rotate counter-clockwise by angle degrees given as 90, 180, 270 degree (or -90, -180, -270).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
logo <- x3p_read(system.file("csafe-logo.x3p", package="x3ptools"))
dim(logo$surface.matrix)
## Not run: 
x3p_image(logo)

## End(Not run)
# rotate the image by 90 degrees counter-clockwise:
logo90 <- x3p_rotate(logo, 90)
dim(logo90$surface.matrix)
## Not run: 
x3p_image(logo90)

## End(Not run)

x3ptools documentation built on Nov. 27, 2021, 1:06 a.m.