% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dependency_tree.R
\name{download_and_parse_dependencies}
\alias{download_and_parse_dependencies}
\title{Download and Parse Dependencies of an R Package}
\usage{
download_and_parse_dependencies(
  package_name,
  version = NA,
  get_license = FALSE
)
}
\arguments{
\item{package_name}{Name of the package to download.}

\item{version}{Package version to download (default: `NA` for latest).}

\item{get_license}{Whether to extract license information (default: `FALSE`).}
}
\value{
When `get_license = FALSE`, a data frame with columns `package`, `type`, and `parent_package`.
  When `get_license = TRUE`, a list with:
    - `dependencies`: Data frame of direct dependencies.
    - `license`: License of the specified package only (not dependencies). Returns `NA` if not found.
}
\description{
Downloads a package from a repository, extracts it, and parses dependencies from the DESCRIPTION file.
}
\details{
The `license` field refers only to the package specified by `package_name`, not its dependencies.
  Use `build_dependency_tree()` or `fetch_all_dependencies()` with `get_license = TRUE` for full license information.
}
\examples{
\dontrun{
download_and_parse_dependencies("dplyr")
download_and_parse_dependencies("dplyr", get_license = TRUE)
}
}
