---
title: "available datasets"
# output: rmarkdown::pdf_document
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{available datasets}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

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

## Overview of datasets available in `pastclim`

A number of datasets are available in pastclim. It is possible to use custom datasets as long as they are properly formatted (look at the article on how to format custom datasets if you are interested). It is possible to get a list of all available datasets with:

```{r}
library(pastclim)
```

```{r echo=FALSE, results='hide'}
data_path <- file.path(tempdir(),"pastclim_data")
# clear it in case it exists already
unlink(data_path, recursive = TRUE) 
# set data path
set_data_path(path_to_nc = data_path,
              ask = FALSE,
              write_config = FALSE,
              copy_example = TRUE)
```

```{r}
get_available_datasets()
```

For each dataset, you can get detailed information using the 
help function:

```{r eval=FALSE}
help("Example")
```

```{r echo=FALSE}
pastclim:::get_dataset_info(dataset="Example")
```

Here we provide the full documentation for each dataset (sorted in alphabetical order):
```{r echo=FALSE}
for (i in sort(get_available_datasets())){
  pastclim:::get_dataset_info(i)
  cat("\n#######################################################\n")
}
```

