Learn R Programming

gcite (version 0.11.0)

gcite_papers: Parse Google Citation Index

Description

Parses a google citation indices (h-index, etc.) from main page

Usage

gcite_papers(doc, ...)

# S3 method for xml_nodeset gcite_papers(doc, ...)

# S3 method for xml_document gcite_papers(doc, ...)

# S3 method for character gcite_papers(doc, ...)

# S3 method for default gcite_papers(doc, ...)

Value

A matrix of indices

Arguments

doc

A xml_document or the url for the main page

...

Additional arguments passed to GET if doc is a URL

Examples

Run this code
library(httr)
library(rvest) 
url = "https://scholar.google.com/citations?user=T9eqZgMAAAAJ"
url = gcite_url(url = url, pagesize = 10, cstart = 0) 
if (!is_travis() & !is_cran()) {
ind = gcite_papers(url)
doc = content(httr::GET(url))
ind = gcite_papers(doc)
ind_nodes = rvest::html_nodes(doc, "#gsc_a_b")
ind = gcite_papers(ind_nodes)
}

Run the code above in your browser using DataLab