% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tidy_ard_order.R
\name{tidy_ard_order}
\alias{tidy_ard_order}
\alias{tidy_ard_column_order}
\alias{tidy_ard_row_order}
\title{Standard Order of ARD}
\usage{
tidy_ard_column_order(x, group_order = c("ascending", "descending"))

tidy_ard_row_order(x)
}
\arguments{
\item{x}{(\code{data.frame})\cr
an ARD data frame of class 'card'}

\item{group_order}{(\code{string})\cr
specifies the ordering of the grouping variables.
Must be one of \code{c("ascending", "descending")}.
Default is \code{"ascending"}, where grouping variables begin with \code{"group1"} variables,
followed by \code{"group2"} variables, etc.}
}
\value{
an ARD data frame of class 'card'
}
\description{
ARD functions for relocating columns and rows to the standard order.
\itemize{
\item \code{tidy_ard_column_order()} relocates columns of the ARD to the standard order.
\item \code{tidy_ard_row_order()} orders rows of ARD according to groups and
strata (group 1, then group2, etc), while retaining the column order of the input ARD.
}
}
\examples{
# order columns
ard <-
  dplyr::bind_rows(
    ard_summary(mtcars, variables = "mpg"),
    ard_summary(mtcars, variables = "mpg", by = "cyl")
  )

tidy_ard_column_order(ard) |>
  tidy_ard_row_order()
}
