Learn R Programming

fulltext (version 0.1.6)

ft_browse: Browse an article in your default browser

Description

Browse an article in your default browser

Usage

ft_browse(x, what = "macrodocs", browse = TRUE)
ft_browse_sections(x, what = "abstract", output = NULL, browse = TRUE)

Arguments

x
An object of class ft_data - the output from a call to ft_get
what
(character) One of macrodocs (default), publisher, or whisker.
browse
(logical) Whether to browse (default) or not. If FALSE, return the url.
output
A file path, if not given, uses a temporary file, deleted up on leaving the R session.

Details

what=whisker not operational yet. When operational, will use whisker to open html page from XML content, each section parsed into separate section.

Examples

Run this code
## Not run: 
# x <- ft_get('10.7554/eLife.04300', from='elife')
# ft_browse(x)
# ft_browse(x, browse=FALSE)
# 
# ft_browse( ft_get('10.3389/fphar.2014.00109', from="entrez") )
# 
# # open to publisher site
# ft_browse(x, "publisher")
# 
# # Browse sections
# x <- ft_get(c('10.1371/journal.pone.0086169',"10.1371/journal.pone.0110535"), from='plos')
# ft_browse_sections(x, "abstract")
# ft_browse_sections(x, "categories")
# 
# opts <- list(fq=list('doc_type:full',"article_type:\"research article\""))
# out <- ft_search(query='ecology', from='plos', plosopts = opts)$plos$data$id %>%
#  ft_get(from = "plos")
# out %>% ft_browse_sections("abstract")
# out %>% ft_browse_sections("body")
# ## End(Not run)

Run the code above in your browser using DataLab