% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/jump.locator.R
\name{jump.locator}
\alias{jump.locator}
\title{Removing artefacts due to manual adjustments of dendrometers automatically for more than one dendrometer}
\usage{
jump.locator(
  df,
  detection_method = c("manual", "auto"),
  manual_threshold = NULL,
  auto_method_penalty = 10,
  adjustment_method = c("window_median", "point_diff"),
  adjust_window = 5,
  auto_every_second = TRUE,
  set_jump_point_na = FALSE
)
}
\arguments{
\item{df}{Data frame 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{detection_method}{Either \code{"manual"} for threshold-based jump
detection or \code{"auto"} for automatic detection using
\code{changepoint::cpt.mean()} with \code{penalty = "Manual"}.}

\item{manual_threshold}{Numeric threshold considered as artefact when
\code{detection_method = "manual"}.}

\item{auto_method_penalty}{Numeric manual penalty value used in
\code{changepoint::cpt.mean()} when \code{detection_method = "auto"}.
Larger values generally lead to fewer detected jumps.}

\item{adjustment_method}{Either \code{"window_median"} (recommended) or
\code{"point_diff"}.}

\item{adjust_window}{Integer window size used for robust jump-size estimation
when \code{adjustment_method = "window_median"}.}

\item{auto_every_second}{Logical. If \code{TRUE}, keeps every second detected
changepoint in automatic mode to mimic the legacy behavior.}

\item{set_jump_point_na}{Logical. If \code{TRUE}, sets the exact jump point to
\code{NA} after correction.}
}
\value{
A dataframe containing jump-free dendrometer data.
}
\description{
Dendrometers generally have limited memory capacity beyond which
they stop recording. To keep the measurement ongoing, they should be adjusted
periodically, which can cause positive or negative jumps in the data. This
function locates these artefacts and adjusts them automatically. Unlike
\code{\link{ i.jump.locator }}, it can handle datasets with more than one
dendrometer.
}
\examples{
\donttest{
library(dendRoAnalyst)
data(nepa)

# Manual detection
jump_free_nepa <- jump.locator(
  df = nepa,
  detection_method = "manual",
  manual_threshold = 1
)

# Automatic detection with cpt.mean() and penalty = "Manual"
jump_free_nepa2 <- jump.locator(
  df = nepa,
  detection_method = "auto",
  auto_method_penalty = 10
)
}

}
