R/circ.dcor.R

Defines functions circ.dcor

Documented in circ.dcor

circ.dcor <- function(theta, phi, rads = FALSE) {
  if ( !rads ) {
    theta <- theta * pi/180
    phi <- phi * pi/180
  }
    
  Rfast::dcor( cbind( cos(theta), sin(theta) ), cbind( cos(phi), sin(phi) ) )
}

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.