metrics: Returns the metrics for a valid ImpactStory ID

View source: R/getMetrics.R

metricsR Documentation

Returns the metrics for a valid ImpactStory ID

Description

Returns the metrics for a valid ImpactStory ID

Usage

  metrics(id = NULL, nspace = "doi", addifnot = FALSE,
    sleep = 0.5,
    key = getOption("ImpactStoryKey", stop("Missing ImpactStory consumer key")))

Arguments

key

An ImpactStory API key

id

An object ID

nspace

Namespace for the identifier. Valid namespaces include doi, github (among others). Read more about available metrics here: http://impactstory.org/faq

addifnot

If TRUE, the function makes a call to create_ISid to put the object in ImpactStory, then the call is made again to retrieve data. If FALSE, and if the identifier is not found, a message returns saying so. Default is FALSE.

sleep

Number of seconds to sleep between pings to retrieve data after posting item to ImpactStory database. Only used if addifnot=TRUE. This is done so as not to hit their servers too hard.

key

Your ImpactStory API key.

Author(s)

Karthik Ram karthik.ram@gmail.com

Examples

## Not run: 
Get metrics on a github repo (username,reponame)
metrics('karthikram,rtools', nspace ='github')
Get metrics on an article from its DOI
metrics('10.1038/171737a0')
# metrics on a figshare document
metrics('10.6084/m9.figshare.91458')

## End(Not run)

ropensci/rImpactStory documentation built on May 18, 2022, 6:30 p.m.