Learn R Programming

x3ptools (version 0.0.2)

rotate_x3p: Rotate an x3p object

Description

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

Usage

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
# NOT RUN {
logo <- read_x3p(system.file("csafe-logo.x3p", package="x3ptools"))
dim(logo$surface.matrix)
# }
# NOT RUN {
image_x3p(logo)
# }
# NOT RUN {
# rotate the image by 90 degrees clock-wise:
logo90 <- rotate_x3p(logo, 90)
dim(logo90$surface.matrix)
# }
# NOT RUN {
image_x3p(logo90)
# }

Run the code above in your browser using DataLab