% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gsr-eda-helpers.R
\name{convert_gazepoint_gsr_to_conductance}
\alias{convert_gazepoint_gsr_to_conductance}
\title{Convert Gazepoint GSR resistance to conductance}
\usage{
convert_gazepoint_gsr_to_conductance(
  data,
  gsr_col = NULL,
  output_col = "GSR_US",
  input_unit = c("auto", "ohms", "kohms", "microsiemens"),
  overwrite = FALSE
)
}
\arguments{
\item{data}{A data frame.}

\item{gsr_col}{Optional source GSR column. If \code{NULL}, a resistance-like column
is detected when possible.}

\item{output_col}{Name of the output conductance column.}

\item{input_unit}{Source unit. \code{"auto"} converts only resistance-like columns;
\code{"ohms"} converts ohms to microSiemens; \code{"kohms"} converts kilo-ohms to
microSiemens; \code{"microsiemens"} copies values to \code{output_col}.}

\item{overwrite}{Logical. If \code{FALSE}, an existing \code{output_col} is not
overwritten.}
}
\value{
The input data frame with a conductance column when conversion is
possible. A structured conversion summary is stored in the
\code{gsr_conversion_summary} attribute.
}
\description{
Converts GSR resistance values to conductance in microSiemens. The helper is
intentionally conservative. If a conductance column such as \code{GSR_US} is
already present, the data are returned unchanged unless \code{overwrite = TRUE}.
If \code{input_unit = "auto"}, conversion is performed only when the source column
has a resistance-like name, such as \code{GSR_OHMS} or \code{resistance_ohms}.
}
\details{
Generic \code{GSR} columns are not automatically assumed to be resistance because
Gazepoint exports and workflows may represent GSR/EDA differently. For a
generic \code{GSR} column, use \code{input_unit = "ohms"} or \code{input_unit = "kohms"}
only when the study documentation confirms resistance units.
}
\examples{
df <- data.frame(GSR_OHMS = c(1000000, 500000, NA))
convert_gazepoint_gsr_to_conductance(df)

}
