R/dwrapcauchy.R

Defines functions dwrapcauchy

Documented in dwrapcauchy

dwrapcauchy <- function(x, m, rho, rads = FALSE, logden = FALSE) {
  if ( !rads )  x <- x * pi/180
  den <-  -log(2 * pi) + log(1 - rho^2) - log1p( rho^2 - 2 * rho * cos(x - m) )
  if ( !logden )  den <- exp(den)
  den
}

Try the Directional package in your browser

Any scripts or data that you put into this service are public.

Directional documentation built on Oct. 12, 2023, 1:07 a.m.