Learn R Programming

x3ptools (version 0.0.3)

x3p_rotate: Rotate an x3p object

Description

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

Usage

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

Run this code
logo <- x3p_read(system.file("csafe-logo.x3p", package="x3ptools"))
dim(logo$surface.matrix)
if (FALSE) {
x3p_image(logo)
}
# rotate the image by 90 degrees counter-clockwise:
logo90 <- x3p_rotate(logo, 90)
dim(logo90$surface.matrix)
if (FALSE) {
x3p_image(logo90)
}

Run the code above in your browser using DataLab