---
title: "Analysing base packages"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{Analysing base packages}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
library(woodendesc)
```

Core packages are shipped with most R installations and some of them are loaded by default when starting a new session (though it's configurable).

## Packages

To list all core packages within the woodendesc framework, i.e. the ones shown by `installed.packages(priority = "base")`, the user should use `wood_core_packages()`.

```{r core_packages, cache=TRUE}
wood_core_packages()
```

## Available package version

In general, all core packages follow the same rule when it comes to determining their version codes: they use the same version code as R itself. Nevertheless, should the user wish to access this data anyways, the woodendesc framework provides `wood_core_version()` function.

```{r core_version, cache=TRUE}
wood_core_version("graphics")
```

## Package dependencies

To list package dependencies the user should use `wood_core_dependencies()`. Expect all "Imports" to be core packages only, as it would make no sense for a core package to depend on something else.

```{r core_deps, cache=TRUE}
wood_core_dependencies("stats")
```
