gcite_citation_page: 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
11
12
13
14
15
16
17
18
19
20
21
gcite_citation_page(doc, title = NULL, force = FALSE, ...)

## S3 method for class 'xml_nodeset'
gcite_citation_page(doc, title = NULL,
  force = FALSE, ...)

## S3 method for class 'xml_document'
gcite_citation_page(doc, title = NULL,
  force = FALSE, ...)

## S3 method for class 'character'
gcite_citation_page(doc, title = NULL,
  force = FALSE, ...)

## S3 method for class 'list'
gcite_citation_page(doc, title = NULL, force = FALSE,
  ...)

## Default S3 method:
gcite_citation_page(doc, title = NULL, force = FALSE,
  ...)

Arguments

doc

A xml_document or the url for the main page

title

title of the article

force

If passing a URL and there is a failure, should the program return NULL?

...

arguments passed to GET

Value

A matrix of indices

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
library(httr)
library(rvest)
url = paste0("https://scholar.google.com/citations?view_op=view_citation&", 
"hl=en&oe=ASCII&user=T9eqZgMAAAAJ&pagesize=100&", 
"citation_for_view=T9eqZgMAAAAJ:W7OEmFMy1HYC")
url = gcite_url(url = url, pagesize = 10, cstart = 0) 
if (!is_travis() & !is_cran()) {
ind = gcite_citation_page(url)
doc = content(httr::GET(url))
ind = gcite_citation_page(doc)
ind_nodes = html_nodes(doc, "#gsc_vcd_table div")
ind_nodes = html_nodes(ind_nodes, xpath = '//div[@class = "gs_scl"]')  
ind = gcite_citation_page(ind_nodes)
}

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