% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/y_create_md_col.R
\name{create_md_col}
\alias{create_md_col}
\title{Create Metadata Column Table}
\usage{
create_md_col(x)
}
\arguments{
\item{x}{A \link{mighty_study} or \link{mighty_domain} object.}
}
\value{
A tibble with one row per column containing:
\describe{
\item{table_id}{Table identifier}
\item{table_label}{Table label/description}
\item{order}{Column order within table}
\item{id}{Column name}
\item{label}{Column label}
\item{origin}{Origin type (e.g., "Predecessor", "Derived")}
\item{key}{Logical, whether column is a key}
\item{is_core}{Logical, whether column is a core variable}
\item{core}{String, whether a column is Req, Cond or Perm}
\item{method}{Derivation method}
\item{codelist}{Codelist reference}
\item{format_type}{Data type ("C" or "N")}
\item{format_length}{Maximum length}
\item{format_display}{Display format}
\item{comment}{Comment}
}
}
\description{
Converts a \link{mighty_study} or \link{mighty_domain} object into a flat dataframe
of column definitions.
}
\examples{
study <- mighty_study(
  path = system.file("examples", package = "mighty.metadata")
)
mdcol <- create_md_col(study)

}
\seealso{
\link{mighty_study}, \code{\link[=populate_sparse]{populate_sparse()}}, \code{\link[=populate_core]{populate_core()}}
}
