Learn R Programming

gcite (version 0.11.0)

gcite_citation_index: Parse Google Citation Index

Description

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

Usage

gcite_citation_index(doc, ...)

# S3 method for xml_node gcite_citation_index(doc, ...)

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

# S3 method for character gcite_citation_index(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) 
library(gcite)
url = "https://scholar.google.com/citations?user=T9eqZgMAAAAJ"
url = gcite_url(url = url, pagesize = 10, cstart = 0) 
if (!is_travis() & !is_cran()) {
ind = gcite_citation_index(url)
doc = content(httr::GET(url))
ind = gcite_citation_index(doc)
ind_nodes = rvest::html_nodes(doc, "#gsc_rsb_st")[[1]]
ind = gcite_citation_index(ind_nodes)
}

Run the code above in your browser using DataLab