% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/make_citation_to_output.R
\name{make_citation_to_output}
\alias{make_citation_to_output}
\title{Export Session Package Citations to Multiple Formats}
\usage{
make_citation_to_output(
  filename = "Session_Citations",
  format = "csv",
  path = NULL,
  packages = NULL
)
}
\arguments{
\item{filename}{A character string specifying the name of the output file.
Defaults to "Session_Citations".}

\item{format}{A character string specifying the output format:
"csv", "word", "excel", or "pdf". Defaults to "csv".}

\item{path}{A character string specifying the directory path for the output.
If NULL (default), it uses a temporary directory. Use "getwd()" for the
current working directory.}

\item{packages}{A character vector of package names to extract citations for.
If NULL (default), citations are extracted for all currently loaded packages
in the session, including base R. Example: \code{packages = c("lavaan", "psych")}.}
}
\value{
The file path of the created document (invisibly).
}
\description{
This function identifies all currently loaded external packages in the current R session,
along with base R, and extracts their citation information. It generates both
plain text and BibTeX formats and exports them using the package's internal
export utility.
}
\examples{
\dontrun{
# Export citations for currently loaded packages to a docs
make_citation_to_output(filename = "My_References", format = "word")

# Export citations for selected packages to a docs in current working directory
make_citation_to_output( packages = c("base","psych","ggplot2"),
                         filename = "Selected_References",
                         format = "word",
                         path = getwd())


# Export to Excel in the current working directory
make_citation_to_output(format = "excel", path = "getwd()")

}

}
