% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ild_provenance.R
\name{ild_export_provenance}
\alias{ild_export_provenance}
\title{Export provenance to a JSON or YAML file}
\usage{
ild_export_provenance(x, path, format = c("auto", "json", "yaml"))
}
\arguments{
\item{x}{An ILD object or an analysis object with [ild_provenance()].}

\item{path}{Character. File path to write (e.g. \code{"analysis_provenance.json"}).}

\item{format}{Character. \code{"auto"} (default) infers from file extension
(\code{.json} -> JSON, \code{.yaml} or \code{.yml} -> YAML). Use \code{"json"}
or \code{"yaml"} to force a format.}
}
\value{
The \code{path} invisibly, after writing the file.
}
\description{
Writes the full provenance structure (data or analysis) to a file for
reproducibility supplements, preregistration appendices, or lab archiving.
Requires the \pkg{jsonlite} package for JSON or \pkg{yaml} for YAML.
}
