Skip to content

Commit

Permalink
Fix vignette for now
Browse files Browse the repository at this point in the history
  • Loading branch information
willgearty committed Oct 1, 2024
1 parent 07bb4c0 commit a2a38e0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
14 changes: 8 additions & 6 deletions vignettes/precompile.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,21 @@ old_wd <- getwd()
setwd("vignettes/")
# Precompile vignettes
library(knitr)
knit("./.source/rredlist.Rmd", "rredlist.Rmd")
knit("./source/_rredlist.Rmd", "rredlist.Rmd")

# Build vignettes
library(devtools)
build_vignettes()

# x = vignette file name including file extension (e.g. "rredlist.Rmd")
# x = vignette file name including file extension (e.g., "rredlist.Rmd")
read_only <- function(x) {
tmp <- file(x)
writeLines(c(
paste0("% Generated by vignettes/precompile.R: do not edit by hand.\n",
"% Please edit source in vignettes/.source/", x),
readLines(x)), tmp)
nlines <- grep("^---\\s*$", readLines(x))[2]
writeLines(
c(readLines(x)[1:(nlines + 1)],
paste0("<!-- Generated by vignettes/precompile.R: do not edit by hand.\n",
"Please edit source in vignettes/source/_", x, " -->"),
readLines(x)[(nlines + 2):length(readLines(x))]), tmp)
close(tmp)
}
# Add read only info
Expand Down
8 changes: 4 additions & 4 deletions vignettes/rredlist.Rmd
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
% Generated by vignettes/precompile.R: do not edit by hand.
% Please edit source in vignettes/.source/rredlist.Rmd
---
title: "Introduction to rredlist"
author: "William Gearty"
date: "2024-09-30"
date: "2024-10-01"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Introduction to rredlist}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---

<!-- Generated by vignettes/precompile.R: do not edit by hand.
Please edit source in vignettes/source/_rredlist.Rmd -->


`rredlist` is an R client for the IUCN Red List API (https://api.iucnredlist.org/).
The [IUCN Red List](https://www.iucnredlist.org/) is the world’s most comprehensive information source on the global extinction risk status of animal, fungus and plant species. This package provides access via R to the various data contained within this database which span range details, population size, habitat and ecology, use and/or trade, threats, and conservation actions.

Documentation for the IUCN Red List API are available at https://api.iucnredlist.org/api-docs. **Note that use of the web API, and therefore this package, [requires authentication](#authentication).**

### What `rredlist` is not
#### What `rredlist` is not:

1. [`redlistr`](https://cran.r-project.org/package=redlistr) is a different package for contributors to the IUCN Red List - not working with the IUCN Red List API.
2. `rredlist` does not include support for the spatial API, described at https://apiv3.iucnredlist.org/spatial.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ The [IUCN Red List](https://www.iucnredlist.org/) is the world’s most comprehe

Documentation for the IUCN Red List API are available at https://api.iucnredlist.org/api-docs. **Note that use of the web API, and therefore this package, [requires authentication](#authentication).**

### What `rredlist` is not
#### What `rredlist` is not:

1. [`redlistr`](https://cran.r-project.org/package=redlistr) is a different package for contributors to the IUCN Red List - not working with the IUCN Red List API.
2. `rredlist` does not include support for the spatial API, described at https://apiv3.iucnredlist.org/spatial.
Expand Down

0 comments on commit a2a38e0

Please sign in to comment.