% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/read.dendrometer.R
\name{read.dendrometer}
\alias{read.dendrometer}
\title{Reading dendrometer data}
\usage{
read.dendrometer(
  file,
  sep = NULL,
  dec = NULL,
  datetime_col = 1,
  date_col = NULL,
  time_col = NULL,
  tz = "UTC",
  sheet = NULL,
  range = NULL,
  na = c("", "NA", "NaN", "nan", "null", "NULL", "-9999"),
  assume_midnight = TRUE,
  orders = NULL,
  excel_dates = c("auto", "none", "1900", "1904"),
  drop_dup_times = TRUE,
  detect_resolution = FALSE,
  return_report = FALSE,
  quiet = TRUE
)
}
\arguments{
\item{file}{Path to file (\code{.csv}, \code{.txt}, \code{.tsv}, \code{.xlsx}).}

\item{sep}{Optional delimiter for text files. If \code{NULL}, auto-detect
among comma, semicolon, tab, and pipe.}

\item{dec}{Optional decimal mark for text files. If \code{NULL}, auto-detect
between \code{"."} and \code{","}.}

\item{datetime_col}{Integer or name of the datetime column (default \code{1}).
Ignored if \code{date_col} is provided.}

\item{date_col}{Optional integer or name of a date column.}

\item{time_col}{Optional integer or name of a time column. Used together with
\code{date_col}. If \code{NULL}, only the date column is parsed and
\code{"00:00:00"} can be appended if \code{assume_midnight = TRUE}.}

\item{tz}{Time zone for parsed datetimes (default \code{"UTC"}).}

\item{sheet}{Excel sheet name or index (for \code{.xlsx}; default \code{NULL} = first sheet).}

\item{range}{Excel cell range (optional).}

\item{na}{Character vector of strings to treat as NA.}

\item{assume_midnight}{Logical; if \code{TRUE}, rows with only a date get \code{"00:00:00"}.}

\item{orders}{Optional vector of \pkg{lubridate} orders to try. If \code{NULL},
a comprehensive default set is used.}

\item{excel_dates}{Character. One of \code{"auto"}, \code{"none"}, \code{"1900"},
or \code{"1904"}. Controls handling of numeric Excel serial dates.}

\item{drop_dup_times}{Logical; if \code{TRUE}, drop duplicated timestamps
(keep first) with a warning/message.}

\item{detect_resolution}{Logical; if \code{TRUE}, compute basic time-resolution diagnostics.}

\item{return_report}{Logical; if \code{TRUE}, return a list with
\code{$data} and \code{$report}. If \code{FALSE}, return the tibble only.
In both cases, the report is attached as \code{attr(x, "import_report")}.}

\item{quiet}{Logical; if \code{TRUE}, suppress informational messages.}
}
\value{
If \code{return_report = FALSE}, a tibble with a POSIXct first column and the
remaining data columns unchanged.

If \code{return_report = TRUE}, a list with:
\describe{
  \item{\code{$data}}{The imported tibble.}
  \item{\code{$report}}{A structured import report.}
}
}
\description{
Reads dendrometer data from \code{.csv}, \code{.txt}, \code{.tsv}, or \code{.xlsx} files,
automatically parsing the datetime information and converting it to
\code{\%Y-\%m-\%d \%H:\%M:\%S} in the requested timezone.

Supports:
\itemize{
  \item automatic delimiter detection for text files,
  \item real decimal-mark auto-detection for text files,
  \item Excel serial date support (\code{1900} / \code{1904} systems),
  \item separate \code{date_col} + \code{time_col},
  \item optional import report output,
  \item optional time-resolution diagnostics.
}
}
