![](../logo.png)
Utility Function to Prepare Exponential Fitted Edges of Trapezoid
Source:R/trapezoid_utilities.R
exponential_coefficients.Rd
Called by optram_wetdry_coefficients
to prepare exponential curve along trapezoid edges.
Calculates the intercept and slope of both wet and dry edges
and updates the edges data.frame with these exp fitted values.
Not exported.
Arguments
- df,
data.frame, values of VI and STR along edges of trapezoid
- output_dir,
string, path to save coefficients CSV file
Note
Three CSV files are saved:
the regressions coefficients,
the trapezoid edge points
RMSE of the fitted curve
Examples
if (FALSE) {
df <- read.csv(system.file("extdata", "trapezoid_edges.csv",
package = "rOPTRAM"))
output_dir <- tempdir()
coeffs <- rOPTRAM::exponential_coefficients(df, output_dir)
coeffs
}