Learn R Programming

cry (version 0.5.2)

angle: Constructor for an S3 object of class "angle"

Description

Constructor for an S3 object of class "angle"

Usage

angle(ang, rad_flag = TRUE)

Value

An object of class "angle" whose numerical value is always in degrees.

Arguments

ang

A real number, in degrees or radians depending on rad_flag.

rad_flag

A logical flag. If FALSE, the value is meant to be in radians.

Examples

Run this code
# Create an angle of 60 degrees
ang1 <- angle(60)
class(ang1)

Run the code above in your browser using DataLab