% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/def.qf.forc.R
\name{def.qf.forc}
\alias{def.qf.forc}
\title{Force a set of quality flags to a particular value based on the value of another flag}
\usage{
def.qf.forc(qf, nameQfDrve, valuDrve, nameQfForc, valuForc, log = NULL)
}
\arguments{
\item{qf}{Data frame of named quality flags (values of -1,0,1)}

\item{nameQfDrve}{Character string. The name of a single "driver" flag in \code{qf}.}

\item{valuDrve}{Numeric. The value of the driver flag that will cause the forced flags in
\code{qfForc} to be set to \code{valuForc}}

\item{nameQfForc}{Character vector. The names of flags in \code{qf} that are to be forced to \code{valuForc} if \code{qfDrve} equals \code{valuDrve}}

\item{valuForc}{Numeric. The value that the flags in \code{qfForc} are to be set to when \code{qfDrve} equals \code{valuDrve}}

\item{log}{A logger object as produced by NEONprocIS.base::def.log.init to produce structured log
output. Defaults to NULL, in which the logger will be created and used within the function.}
}
\value{
The \code{qf} data frame, after forcing any applicable values.
}
\description{
Definition function. Force a set of quality flags to a particular value based on the value of another flag
}
\examples{
qf <- data.frame(QF1=c(1,-1,1,0,-1),QF2=c(-1,1,0,0,0),stringsAsFactors=FALSE)
def.qf.forc(qf=qf,qfDrve='QF1',valuDrve=1,qfForc='QF2',valuForc=0)
}
\references{
License: (example) GNU AFFERO GENERAL PUBLIC LICENSE Version 3, 19 November 2007
}
\seealso{
Currently none
}
\author{
Cove Sturtevant \email{csturtevant@battelleecology.org}
}
\keyword{Currently}
\keyword{none}
