% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/reso_dm.R
\name{reso_dm}
\alias{reso_dm}
\title{Detect Temporal Resolution and Irregularities in Time Series}
\usage{
reso_dm(input_time)
}
\arguments{
\item{input_time}{A vector of class \code{POSIXct}, \code{Date}, or \code{character}
representing time stamps.}
}
\value{
A single integer: the estimated (rounded) average resolution in minutes.
        If multiple intervals are detected, a warning and index positions are printed.
}
\description{
Determines the average temporal resolution (in minutes) of a time series vector (e.g., dendrometer timestamps)
and detects inconsistencies in time intervals. If the time column is character-formatted, it is automatically
converted to POSIXct. Any inconsistent intervals are flagged and printed.
}
\details{
This function is helpful for checking if a time series (especially dendrometer data) is regularly sampled.
It handles both regular and irregular timestamps and gives feedback if the resolution changes.
}
\examples{
\dontrun{
# Regular 30-minute time sequence
time_seq <- seq.POSIXt(from = as.POSIXct("2023-06-01 00:00:00"),
                       by = "30 min", length.out = 100)
reso_dm(time_seq)  # Should return 30

# With character time input
time_char <- format(time_seq, format = "\%Y-\%m-\%d \%H:\%M:\%S")
reso_dm(time_char)  # Auto converts to POSIXct

# Introduce an irregular step
time_seq[51] <- time_seq[50] + 60  # One-time 1-hour jump
reso_dm(time_seq)  # Should print warning and irregular step index
}

}
