ma_evaluate: Evaluate API

Description Usage Arguments Value References Examples

View source: R/evaluate.R

Description

Evaluate API

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
ma_evaluate(
  query,
  count = 10,
  offset = 0,
  orderby = NULL,
  atts = c("Id", "AA.AuN", "J.JN", "Ti", "Y", "CC"),
  model = "latest",
  key = NULL,
  ...
)

Arguments

query

(character) query terms

count

(intger) number of records to return. default: 10

offset

(intger) record number to start at. default: 0

orderby

(logical) column by which to order. default: none

atts

(character) fields to return, in a character vector. See https://docs.microsoft.com/en-us/academic-services/project-academic-knowledge/reference-entity-attributes for details.

model

(character) Name of the model that you wish to query. One of 'latest' or 'beta-2015'. Default: latest

key

(character) microsoft academic API key, see the Authentication section in microdemic-package

...

curl options passed on to crul::HttpClient

Value

a list of length two, with expr (character) and entities (data.frame)

References

Query expression syntax https://docs.microsoft.com/en-us/academic-services/project-academic-knowledge/reference-query-expression-syntax

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
# any numeric value that starts with 19
ma_evaluate(query = "Y='19'...")
# author name matching, and request certain fields back
ma_evaluate(query = "Composite(AA.AuN=='smith')",
  atts = c('Id', 'AA.AuN'))
# matching year 2010 and request Id and Y fields
ma_evaluate(query = "Y=2010", atts = c('Id', 'Y'))
# range of years: includes only left boundary value: 2010, 2012
ma_evaluate(query = "Y=[2010, 2012)", atts = c('Id', 'Y'))
# range by specific dates
ma_evaluate(query = "D=['2010-02-03','2010-02-05']", atts = c('Id', 'Y'))
# matching author and matching affiliation
x <- "Composite(And(AA.AuN='mike smith',AA.AfN='harvard university'))"
ma_evaluate(x)

## End(Not run)

microdemic documentation built on Nov. 20, 2020, 9:06 a.m.