circ.dens | R Documentation |
calculates kernel density estimates for circular data (‘phase angles’).
It is a convenience wrapper around the
density.circular
function from package circular
that (a) coerces results to numeric
types to avoid automatic handling of the S3 class circular data
(eg. polar plots), (b) allows to scale densities by the absolute number
(argument freq
), and (c) can alternatively invoke
density
from the stats
package
(see option high.mem
) for long phase vectors (‘genome-wide’)
due to high memory usage of
density.circular
.
NOTE: results are equivalent only for the scaled version freq=TRUE;
TODO: find out why densities differ by a factor of ~100 between the 2
circ.dens(
x,
bw = 18,
n = 512,
freq = FALSE,
units = "degrees",
high.mem = FALSE,
na.rm = TRUE,
...
)
x |
phases in degrees and of class numeric |
bw |
the smoothing bandwith parameter |
n |
the number of equally spaced points at which density will be estimated |
freq |
if TRUE densities |
units |
phase angle units, 'degrees' or 'radians' |
high.mem |
use |
na.rm |
remove NA values before calculation |
... |
further arguments to
|
density.circular
,
density
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.