metrics: Returns the metrics for a valid ImpactStory ID

Description Usage Arguments Author(s) Examples

Description

Returns the metrics for a valid ImpactStory ID

Usage

1
2
3
  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 [email protected]

Examples

1
2
3
4
5
6
7
8
9
## 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 27, 2019, 5:31 p.m.