---
title: "gvc"
author: "Bastiaan Quast"
date: "`r Sys.Date()`"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{gvc}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

A typical workflow begins with using the Leontief decomposition in the `decompr` package.

```{r}
# load the decompr package
library(decompr)
```

We will use the example data set.

```{r}
# load the example data set
data(leather)
attach(leather)
```

and apply the leontief decomposition and post multiply with exports

```{r}
l <- decomp(x = inter,
            y = final,
            k = countries,
            i = industries,
            o = out,
            method = "leontief",
            post = "exports"    )
```

We can now analyse the `l` object with the **gvc** package.

```{r}
library(gvc)
```

For instance, using the **New Revealed Comparative Advantage** (`nrca()`),

```{r}
nrca(l)
```

or using **Importing to Export** (`i2e()`),

```{r}
i2e(l)
```
