Learn R Programming

affiner (version 0.1.3)

angular_unit: Get/set angular unit of angle vectors

Description

angular_unit() gets/sets the angular unit of angle() vectors.

Usage

angular_unit(x)

angular_unit(x) <- value

Value

angular_unit() returns a string of x's angular unit.

Arguments

x

An angle() vector

value

A string of the desired angular unit. See angle() for supported strings.

Examples

Run this code
a <- angle(seq(0, 360, by = 90), "degrees")
angular_unit(a)
print(a)
angular_unit(a) <- "turns"
angular_unit(a)
print(a)

Run the code above in your browser using DataLab