Learn R Programming

fdm2id (version 0.9.9)

rotation: Rotation

Description

Rotation on two variables of a numeric dataset

Usage

rotation(d, angle, axis = 1:2, range = 2 * pi)

Value

A rotated data matrix.

Arguments

d

The dataset.

angle

The angle of the rotation.

axis

The axis.

range

The range of the angle (360, 2*pi, 100, ...)

Examples

Run this code
d = data.parabol ()
d [, -3] = rotation (d [, -3], 45, range = 360)
plotdata (d [, -3], d [, 3])

Run the code above in your browser using DataLab