cosd | R Documentation |
Calculates the value of cosine for each element of x
in degrees in a
manner compatible with GNU Octave/MATLAB. Zero is returned for any 'elements
where (x
- 90) / 180 is an integer.' Reference: Eaton.
cosd(x)
x |
A numeric vector containing values in degrees |
The cosine of each element of x
in degrees. Zero for any
'elements where (x
- 90) / 180 is an integer.'
Note: If you have a radian (rad) angle value, use cos
instead.
David Bateman (GNU Octave cosd), Irucka Embry
r - How to not run an example using roxygen2? - Stack Overflow answered and edited by samkart on Jul 9 2017. (Also see the additional comments in response to the answer.) See https://stackoverflow.com/questions/12038160/how-to-not-run-an-example-using-roxygen2.
devtools - Issues in R package after CRAN asked to replace dontrun by donttest - Stack Overflow answered by Hong Ooi on Sep 1 2020. (Also see the additional comments in response to the answer.) See https://stackoverflow.com/questions/63693563/issues-in-r-package-after-cran-asked-to-replace-dontrun-by-donttest.
John W. Eaton, David Bateman, Søren Hauberg, and Rik Wehbring (November 2022). GNU Octave: A high-level interactive language for numerical computations: Edition 7 for Octave version 7.3.0. https://docs.octave.org/octave.pdf. Page 553.
Wikimedia Foundation, Inc. Wikipedia, 24 February 2019, "Radian", https://en.wikipedia.org/wiki/Radian.
library(iemisc)
# Example from GNU Octave cosd
cosd(seq(0, 80, by = 10))
# See Source 1 and Source 2
library(iemisc)
try(cosd("90"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.