% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/calc_daylength.R
\name{add_daylength}
\alias{add_daylength}
\title{Add Daylength to Phenological Data}
\usage{
add_daylength(pep)
}
\arguments{
\item{pep}{A \code{pep} object or data.table with \code{day} and
\code{lat} columns.}
}
\value{
The input data with an added \code{daylength} column (hours).
}
\description{
Adds a daylength column to a phenological dataset based on the
observation day and station latitude.
}
\examples{
\donttest{
pep <- pep_download()
pep <- add_daylength(pep)
head(pep[, .(day, lat, daylength)])
}

}
\seealso{
\code{\link{calc_daylength}} for the underlying calculation
}
\author{
Matthias Templ
}
