asAngle: Convert numeric to an Angle.

Description Usage Arguments Value See Also Examples

Description

Helper function for converting a numeric vector to an Angle. It is similar to coercing. For example, as(45, "Angle") return the same object than asAngle(45).

Usage

1
2
3
4
asAngle(x, degrees = TRUE)

## S4 method for signature 'numeric'
asAngle(x, degrees = TRUE)

Arguments

x

numeric

degrees

logical. By default is set as TRUE, meaning x is in degrees. If FALSE x should be in radians.

Value

Angle.

See Also

switchUnit

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
asAngle(90)
asAngle(c(1:90))

asAngle(pi) # this is incorrect
asAngle(pi, FALSE)

## Not run: 
  asAngle(370)

## End(Not run)

GastonMauroDiaz/caiman documentation built on Jan. 22, 2022, 4:43 a.m.