gcite_citation_index: Parse Google Citation Index

Description Usage Arguments Value Examples

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
gcite_citation_index(doc, ...)

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

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

## S3 method for class 'character'
gcite_citation_index(doc, ...)

Arguments

doc

A xml_document or the url for the main page

...

Additional arguments passed to GET if doc is a URL

Value

A matrix of indices

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
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)
}

gcite documentation built on May 2, 2019, 10:15 a.m.