core_advanced_search: Advanced Search CORE

Description Usage Arguments Details Value References Examples

View source: R/core_advanced_search.R

Description

Advanced Search CORE

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
core_advanced_search(
  ...,
  page = 1,
  limit = 10,
  key = NULL,
  parse = TRUE,
  .list = list()
)

core_query(..., op = "AND")

Arguments

...

for core_query(), query fields, see Details. for core_advanced_search() any number of queries, results of calling core_query(). Required. See Details.

page

(character) page number (default: 1), optional

limit

(character) records to return (default: 10, minimum: 10, maximum: 100), optional

key

A CORE API key. Get one at https://core.ac.uk/api-keys/register. Once you have the key, you can pass it into this parameter, or as a much better option, store your key as an environment variable with the name CORE_KEY or an R option as core_key. See ?Startup for how to work with env vars and R options

parse

(logical) Whether to parse to list (FALSE) or data.frame (TRUE). Default: TRUE

.list

alternative to passing core_query() calls to ...; just create a list of them and pass to this parameter; easier for programming with

op

(character) operator to combine multiple fields. options: AND, OR

Details

query should be one or more calls to core_query(), (at least one is required):

core_advanced_search does the HTTP request and parses, while core_advanced_search_ just does the HTTP request, gives back JSON as a character string

Value

data.frame with the following columns:

References

https://core.ac.uk/docs/#!/all/searchBatch

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## Not run: 
## compose queries
core_query(title="psychology", year=2014)
core_query(title="psychology", year=2014, op="OR")
core_query(identifiers='"oai:aura.abdn.ac.uk:2164/3837"',
  identifiers='"oai:aura.abdn.ac.uk:2164/3843"', op="OR")

## do actual searches
core_advanced_search(
  core_query(identifiers='"oai:aura.abdn.ac.uk:2164/3837"',
    identifiers='"oai:aura.abdn.ac.uk:2164/3843"', op="OR")
)

res <- core_advanced_search(
  core_query(title="psychology"),
  core_query(doi='"10.1186/1471-2458-6-309"'),
  core_query(language.name="german")
)
res

## End(Not run)

rcoreoa documentation built on July 8, 2020, 7:30 p.m.