% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pwmean_s2_prepare_sc.R
\name{prepare_sc_data}
\alias{prepare_sc_data}
\title{Extract and align sc data from a build object}
\usage{
prepare_sc_data(build)
}
\arguments{
\item{build}{A `pw_fit` object returned by the build step.}
}
\value{
A list with components:

- `sc`: data frame of build-stage complete cases.
- `X`: covariate matrix `build$internal$Xc`.
- `w`: pseudo-weight vector with NA placeholders removed.
- `idx_keep`: integer index of which rows of `raw_sc` were retained.
}
\description{
Reads the raw sc sample, the build-stage complete-case index
(`keep_sc`), the covariate matrix `Xc`, and the pseudo-weights from
`build`. Remove NA placeholders inserted by `na.exclude` so that all
returned vectors and matrices have the same length (the number of
build-stage complete cases).
}
\keyword{internal}
