% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/nm_helpers.R
\name{locf_value}
\alias{locf_value}
\title{LOCF / LOCB Lookup}
\usage{
locf_value(target_t, source_t, source_v, fallback = NA_real_)
}
\arguments{
\item{target_t}{vector of target times (numeric or POSIXct).}

\item{source_t}{vector of source times (same type as target_t).}

\item{source_v}{numeric vector of source values, parallel to source_t.}

\item{fallback}{value used when no source is available. Default NA.}
}
\value{
numeric vector, length(target_t).
}
\description{
For each target time, return the most-recent source value at
source_t <= target_t (LOCF). If no preceding source exists, return the
earliest source_v at source_t > target_t (LOCB). Empty source returns
\code{fallback} for all targets.
}
