% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dm.fit.gompertz.R
\name{dm.fit.gompertz}
\alias{dm.fit.gompertz}
\title{Fitting gompertz function on annual dendrometer data}
\usage{
dm.fit.gompertz(
  df,
  CalYear,
  TreeNum,
  f_derivative = F,
  start = list(b = 0.5, k = 0.005),
  verbose = FALSE
)
}
\arguments{
\item{df}{dataframe with first column containing date and time in the format \code{yyyy-mm-dd HH:MM:SS} and the dendrometer data in following columns.}

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

\item{TreeNum}{numerical value indicating the tree to be analysed. E.g. '1' refers to the first dendrometer data column in \emph{df}.}

\item{f_derivative}{logical if yes returns first derivative of gompertz curve.}

\item{start}{A named list of start values for fitting
the Gompertz curve (passed to \code{\link[minpack.lm]{nlsLM}}). Default is
\code{list(b = 0.5, k = 0.005)}.}

\item{verbose}{logical if TRUE also returns the optimized parameters. Default is
FALSE.}
}
\value{
A data frame with the modelled dendrometer series. If \code{verbose = TRUE}, returns a list
 with two data frames. The fitted curve and parameters.
}
\description{
This function modells the annual growth of dendrometer data using gompertz function.
}
\examples{
\donttest{library(dendRoAnalyst)
data(gf_nepa17)
gomp_fitted<-dm.fit.gompertz(df=gf_nepa17, TreeNum = 1, CalYear=2017)
head(gomp_fitted,10)}

}
