dm.fit.gompertz: Fitting gompertz function on annual dendrometer data

View source: R/dm.fit.gompertz.R

dm.fit.gompertzR Documentation

Fitting gompertz function on annual dendrometer data

Description

This function modells the annual growth of dendrometer data using gompertz function.

Usage

dm.fit.gompertz(
  df,
  CalYear,
  TreeNum,
  f_derivative = F,
  start = list(b = 0.5, k = 0.005),
  verbose = FALSE
)

Arguments

df

dataframe with first column containing date and time in the format yyyy-mm-dd HH:MM:SS and the dendrometer data in following columns.

CalYear

numeric for year of calculation. If df has more than one year, assigning CalYear truncates the data of only that year.

TreeNum

numerical value indicating the tree to be analysed. E.g. '1' refers to the first dendrometer data column in df.

f_derivative

logical if yes returns first derivative of gompertz curve.

start

A named list of start values for fitting the Gompertz curve (passed to nlsLM). Default is list(b = 0.5, k = 0.005).

verbose

logical if TRUE also returns the optimized parameters. Default is FALSE.

Value

A data frame with the modelled dendrometer series. If verbose = TRUE, returns a list with two data frames. The fitted curve and parameters.

Examples

library(dendRoAnalyst)
data(gf_nepa17)
gomp_fitted<-dm.fit.gompertz(df=gf_nepa17, TreeNum = 1, CalYear=2017)
head(gomp_fitted,10)


dendRoAnalyst documentation built on May 20, 2026, 5:07 p.m.