deg2rad | R Documentation |
Returns a vector after converting degrees to radians.
When overlap is set to TRUE, output is contained within the [-pi, pi] set.
deg2rad(deg, overlap = T)
deg2rad(deg)
deg |
Numeric vector containing the angle values in degrees. |
overlap |
A binary bit, set to FALSE by default. |
Input argument "deg" must be a numeric vector.
Input argument "overlap" must be a vector of dimension equal to unity.
Input argument "overlap" must be of logical type.
The returned value is always a vector of the same length as the argument "deg"
Chitran Ghosal
#test code for positive
test_pos <- NULL
for (i in 1:12) {
test_pos <- c(test_pos, i*60)
}
v_pos <- deg2rad(test_pos, overlap = T)
test_pos
v_pos
#test code for negative
test_neg <- NULL
for (i in 1:12) {
test_neg <- c(test_neg, -i*60)
}
v_neg <- deg2rad(test_neg, overlap = T)
test_neg
v_neg
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.