TrajFractalDimensionValues {trajr} | R Documentation |
Fractal dimension calculation
Description
Calculates path length () for a range of step sizes
(
). For a fractal (i.e. scale independent) curve,
grows linearly as
grows smaller. In
other words, if the points returned by this function lie on a straight line
in a log-log plot,
trj
is a fractal curve.
Usage
TrajFractalDimensionValues(trj, stepSizes, adjustD = TRUE)
Arguments
trj |
Trajectory to calculate fractal dimension for. |
stepSizes |
Vector of step sizes used to calculate path lengths. |
adjustD |
If TRUE, path length is adjusted to reduce truncation error (Nams, 2006). |
Value
Data frame with columns stepsize
() and
pathlength
(().
References
Nams, V. O. (2006). Improving Accuracy and Precision in Estimating Fractal Dimension of Animal movement paths. Acta Biotheoretica, 54(1), 1-11. doi:10.1007/s10441-006-5954-8
See Also
TrajFractalDimension
for fractal dimension
calculation.
Examples
set.seed(42)
trj <- TrajGenerate()
muL <- mean(TrajStepLengths(trj))
# Use 20 step sizes from 1/2 mean step length to 5 * mean step length.
# For real use, biologically meaningful step sizes should be used.
stepSizes <- TrajLogSequence(0.5 * muL, 5 * muL, 20)
plot(TrajFractalDimensionValues(trj, stepSizes), log = "xy", pch = 16, cex = .5)
[Package trajr version 1.5.1 Index]