% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/compose.R
\name{wf_compose}
\alias{wf_compose}
\title{Compose multiple weighting stages}
\usage{
wf_compose(..., id = NULL, normalize = c("none", "mean1", "sum"))
}
\arguments{
\item{...}{Two or more \code{wf_weights} objects.}

\item{id}{Optional shared ID column in each stage's \verb{$data}. If \code{NULL},
\code{wf_compose()} uses \code{data$id} when every stage has it, or row order when no
stage has an ID column.}

\item{normalize}{Weight normalization mode: \code{"none"}, \code{"mean1"}, or \code{"sum"}.}
}
\value{
A composed \code{wf_weights} object.
}
\description{
Multiplies compatible \code{wf_weights} objects into one auditable pipeline result.
}
\examples{
stage1 <- structure(
  list(
    data = data.frame(id = c("r1", "r2"), group = "A", weight = c(2, 3)),
    log = data.frame(group = "A"),
    achieved = NULL,
    provenance = list(method = "stage1")
  ),
  class = "wf_weights"
)
stage2 <- stage1
stage2$data$weight <- c(0.5, 2)
stage2$provenance$method <- "stage2"
wf_compose(stage1, stage2)
}
