msearch: msearch.R Search Method (Public Method)

View source: R/search.R

msearchR Documentation

msearch.R Search Method (Public Method)

Description

msearch.R Search Method (Public Method)

Usage

msearch(query, page = NA, numItems = 1000L, key = getOption("MendeleyKey",
  stop("need an API key for Mendeley")), curl = getCurlHandle(), ...)

Arguments

query

any search query. Can use the options: authors, year, title, published_in, followed by colons e.g. authors:Alistair Boettiger published_in:Science

page

number pages to return (optional)

numItems

number of hits to return (optional)

key

Mendeley API key (otherwise will try and load from package)

...

optional additional curl options (debugging tools mostly)

curl

If using in a loop, call getCurlHandle() first and pass the returned value in here (avoids unnecessary footprint)

Details

see http://apidocs.mendeley.com/home/public-resources/search-terms

Value

all results matching the query for the author

Examples

## Not run: 
 a = msearch('bob', , 20)
 b = msearch('bob', 4, 20)
 d = msearch('authors:Alistair Boettiger published_in:Science')
 # Get the DOIs of Journal of Ecology hits (returns first 999 exact matches)
  all <- msearch('published_in:\'Journal of Ecology\'')
  dois <- sapply(all, function(x) x$doi)

## End(Not run)

ropensci/RMendeley documentation built on May 18, 2022, 8:58 a.m.