jump.locator: Removing artefacts due to manual adjustments of dendrometers...

View source: R/jump.locator.R

jump.locatorR Documentation

Removing artefacts due to manual adjustments of dendrometers automatically for more than one dendrometer

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 i.jump.locator , it can handle datasets with 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

df

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

detection_method

Either "manual" for threshold-based jump detection or "auto" for automatic detection using changepoint::cpt.mean() with penalty = "Manual".

manual_threshold

Numeric threshold considered as artefact when detection_method = "manual".

auto_method_penalty

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

adjustment_method

Either "window_median" (recommended) or "point_diff".

adjust_window

Integer window size used for robust jump-size estimation when adjustment_method = "window_median".

auto_every_second

Logical. If TRUE, keeps every second detected changepoint in automatic mode to mimic the legacy behavior.

set_jump_point_na

Logical. If TRUE, sets the exact jump point to NA after correction.

Value

A dataframe containing jump-free dendrometer data.

Examples


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
)



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