join_for_links: Join an ECOS table of text with the links to documents

Description Usage Arguments Value

Description

Extracting tables with links in cells using rvest isn't straight-forward. But by listing the links with html_nodes(..., "href") and the link text with html_text(...) (i.e., the link title), then joining with the table Title field, we can associate every doc link with the other fields in the table.

Usage

1
join_for_links(tab, links, species)

Arguments

tab

The table (as a data.frame) to be joined if it has a Title var

links

A data.frame with the Title of the link and the URL

species

The scientific name to be included in the returned data.frame

Value

A data.frame with URL, if tab includes a Title variable


jacob-ogre/ecosscraper documentation built on May 18, 2019, 8 a.m.