msearch: msearch.R Search Method (Public Method)

Description Usage Arguments Details Value Examples

View source: R/search.R

Description

msearch.R Search Method (Public Method)

Usage

1
2
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

1
2
3
4
5
6
7
8
9
## 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 16, 2018, 6:57 a.m.