% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MFRCD.R
\name{rc_from_principal_block}
\alias{rc_from_principal_block}
\title{Construct a row-column design from a principal block}
\usage{
rc_from_principal_block(
  levels,
  block_size,
  principal_block = NULL,
  use_mixedfact = TRUE,
  mixedfact_method = "auto",
  choose_block = "best",
  sep = "",
  details = FALSE
)
}
\arguments{
\item{levels}{Integer vector of factor levels.}

\item{block_size}{Block size used in the construction.}

\item{principal_block}{Optional principal block of treatment labels.}

\item{use_mixedfact}{Logical; if TRUE, allow the mixedfact-based construction route.}

\item{mixedfact_method}{Method passed to mixedfact when that route is used.}

\item{choose_block}{Rule for choosing a block when several are available.}

\item{sep}{Character separator used in treatment labels.}

\item{details}{Logical; if TRUE, return construction details.}
}
\value{
A list, matrix, data frame, or classed object containing the requested row-column design information.
}
\description{
Construct a row-column design from a principal block.
}
\examples{
pb <- matrix(c(0, 0, 0, 1), ncol = 2, byrow = TRUE)
ex <- rc_from_principal_block(c(2, 2), block_size = 2, principal_block = pb, details = TRUE)
stopifnot(is.matrix(ex$design))
}
