TrajFractalDimensionValues: Fractal dimension calculation

View source: R/fractal.R

TrajFractalDimensionValuesR Documentation

Fractal dimension calculation

Description

Calculates path length (L(\delta)) for a range of step sizes (\delta). For a fractal (i.e. scale independent) curve, log(L(\delta)) grows linearly as log(\delta) 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 (\delta) and pathlength ((L(\delta)).

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)


trajr documentation built on May 29, 2024, 11:52 a.m.