Learn R Programming

rscielo (version 1.0.0)

get_article: Scrape text from a single article hosted on Scielo

Description

get_article() scrapes the full text from an article hosted on Scielo. In bilingual journals, the text retrieved is in the journal's main language used for publication (most of the time, it is English).

Usage

get_article(x, output_text = TRUE)

Arguments

x

a character vector with the link or id of the article hosted on Scielo to be scrapped.

output_text

a logical indicating whether get_article() should return a character vector or a tibble (defaults to TRUE).

Value

When the argument output_text is TRUE, the function returns a character vector with the requested article's content. When output_text is FALSE, the function returns a tibble with the following variables:

  • text: article's full text (character).

  • doi: article's Digital Object Identifier (DOI, (character)).

Examples

Run this code
# NOT RUN {
article <- get_article(x = "http://www.scielo.br/scielo.php?
script=sci_arttext&pid=S1981-38212016000200201&lng=en&nrm=iso&tlng=en")
# }

Run the code above in your browser using DataLab