gcite_citation_page {gcite}R Documentation

Parse Google Citation Index

Description

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

Usage

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

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)
}

[Package gcite version 0.10.1 Index]