box_counting: Computes fractal dimension using the box counting method.

Description Usage Arguments Value References Examples

View source: R/Box_counting.R

Description

Computes fractal dimension using the box counting method.

Usage

1
box_counting(data, min_vox_size, store_fit, message)

Arguments

data

a data.frame or data.table containing the x, y, z, ... coordinates of a point cloud.

min_vox_size

numeric. The minimum size of a voxel. Default = 0.01.

store_fit

logical. If TRUE, the parameters linear model's fit are returned. Default = FALSE.

message

logical. If FALSE, messages are disabled. Default = TRUE.

Value

If store_fit = FALSE only the fractal dimension is returned. If store_fit = TRUE the parameters of the linear model used to estimate the fractal dimension and a table containing the number of boxes (i.e. voxels) at any resolution are returned in a list in addition to the fractal dimension.

References

Seidel, D. (2018). A holistic approach to determine tree structural complexity based on laser scanning data and fractal analysis. Ecology and evolution, 8(1), 128-134.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#- import tls data
tls=data.table::fread(system.file("extdata", "Tree_t0.asc", package="VoxR"))

#- box counting
FD = VoxR::box_counting(tls,store_fit = TRUE)

#- fractal dimension
FD$fractal_dim
#- linear model fit
FD$fit_summary
#- plot fit
plot(log(FD$fit_table$N)~log(1/FD$fit_table$res))
abline(FD$fit_summary)

VoxR documentation built on Nov. 16, 2020, 9:14 a.m.