Description Usage Arguments Value Examples
View source: R/gcite_citation_page.R
Parses a google citation indices (h-index, etc.) from main page
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 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, ...)
|
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 |
... |
arguments passed to |
A matrix of indices
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_oci_table div")
ind_nodes = html_nodes(ind_nodes, xpath = '//div[@class = "gs_scl"]')
ind = gcite_citation_page(ind_nodes)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.