% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/StudySpecificationAccessors.R
\name{.bin_txt}
\alias{.bin_txt}
\title{(Internal) Extracts treatment as binary \code{vector}}
\usage{
.bin_txt(spec, data = NULL, dichotomy = NULL)
}
\arguments{
\item{spec}{A \code{StudySpecification}, used to get treatment assignment
information}

\item{data}{A dataframe with unit of assignment information and, if a
dichotomy is provided, columns specified therein}

\item{dichotomy}{Optional, a formula. See the Details section of the
\code{ett()} or \code{att()} help pages for information on specifying the
formula}
}
\value{
A \code{vector} of binary treatments
}
\description{
(Internal) Extracts treatment as binary \code{vector}
}
\details{
If a \code{dichotomy} is specified or the \code{StudySpecification}
has a treatment variable consisting only of 0/1 or \code{NA}, then returns
the binary treatment. Otherwise (it has a non-binary treatment and lacks a
dichotomy) it errors.
}
\keyword{internal}
