gcite_citation_index: Parse Google Citation Index

Description Usage Arguments Value Examples

View source: R/gcite_citation_index.R

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
if (!is_travis()) {
library(httr)
library(rvest) 
library(gcite)
url = "https://scholar.google.com/citations?user=T9eqZgMAAAAJ"
url = gcite_url(url = url, pagesize = 10, cstart = 0) 
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)
}

muschellij2/gcite documentation built on Feb. 6, 2018, 7:45 a.m.