TrajFractalDimensionValues | R Documentation |
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.
TrajFractalDimensionValues(trj, stepSizes, adjustD = TRUE)
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). |
Data frame with columns stepsize
(\delta
) and
pathlength
((L(\delta)
).
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
TrajFractalDimension
for fractal dimension
calculation.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.