Skip to content

Commit

Permalink
Fixed file paths, silenced a title mistmatch issue, and renamed chunk…
Browse files Browse the repository at this point in the history
…s with duplicate chunk names
  • Loading branch information
njlyon0 committed Mar 21, 2024
1 parent 6808dca commit 827dfe0
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions vignettes/dataset-single-DataOne.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
# Ignore difference in YAML title versus `\VignetteIndexEntry{}`
options(rmarkdown.html_vignette.check_title = FALSE)
```

## Summary
Expand Down Expand Up @@ -92,7 +95,7 @@ At this point, you should have the data and the metadata downloaded inside your


```{r, out.width="90%", echo=FALSE, fig.align="center", fig.cap="Local file structure of a dataset downloaded by metajam"}
knitr::include_graphics("../inst/images/metajam_v1_folder.png")
knitr::include_graphics("../man/figures/metajam_v1_folder.png")
```


Expand All @@ -115,13 +118,13 @@ For the second example, we are using Marine bird survey observation and density

## Libraries and constants

```{r libraries, warning=FALSE}
```{r libraries-2, warning=FALSE}
# devtools::install_github("NCEAS/metajam")
library(metajam)
```

```{r constants}
```{r constants-2}
# Directory to save the data set
path_folder <- "Data_alaska"
Expand All @@ -133,7 +136,7 @@ data_url <- "https://cn.dataone.org/cn/v2/resolve/4139539e-94e7-49cc-9c7a-5f879e

## Download the dataset

```{r download, eval=FALSE}
```{r download-2, eval=FALSE}
# Create the local directory to download the datasets
dir.create(path_folder, showWarnings = FALSE)
Expand All @@ -155,13 +158,13 @@ At this point, you should have the data and the metadata downloaded inside your


```{r, out.width="90%", echo=FALSE, fig.align="center", fig.cap="Local file structure of a dataset downloaded by metajam"}
knitr::include_graphics("../inst/images/metajam_v1_folder.png")
knitr::include_graphics("../man/figures/metajam_v1_folder.png")
```


## Read the data and metadata in your R environment

```{r read_data, eval=FALSE}
```{r read_data-2, eval=FALSE}
# Read all the datasets and their associated metadata in as a named list
coweeta_diatom <- metajam::read_d1_files(data_folder)
Expand All @@ -173,5 +176,5 @@ You have now loaded in your R environment one named list object that contains th


```{r, out.width="90%", echo=FALSE, fig.align="center", fig.cap="Structure of the named list object containing tabular metadata and data as loaded by metajam"}
knitr::include_graphics("../inst/images/metajam_v1_named_list.png")
knitr::include_graphics("../man/figures/metajam_v1_named_list.png")
```

0 comments on commit 827dfe0

Please sign in to comment.