find_flat: Finds the Flattest Part of the Bearing Area Curve

Description Usage Arguments Value Examples

View source: R/bearingarea.R

Description

Locates the flattest x percentage of the Bearing Area curve. Meant to locate the flattest 40 percent of the Bearing Area curve as used in several roughness parameter calculations.

Usage

1
find_flat(x, perc = 0.4)

Arguments

x

A raster or matrix.

perc

Numeric between 0 and 1. The percentage of the curve over which to fit the line.

Value

A list containing the equation for the best fit line, the predicted values from that line, the high and low y-intercept values for the intersection points of the line with the Bearing Area curve, and the high and low x-intercept values for the intersection points of the line with the Bearing Area curve.

Examples

1
2
3
4
5
6
7
8
# import raster image
data(normforest)

# locate the flattest 40% of the bearing area curve
line_data <- find_flat(normforest, perc = 0.4)

# extract the equation of the line
bf_line <- line_data[[1]]

geodiv documentation built on Sept. 5, 2021, 5:26 p.m.