Search
Usage
hal_search(query, ...)
hal_count(query, ...)
# S3 method for class 'HALQuery'
hal_count(query, path = "search", instance = NULL, ...)
# S3 method for class 'HALQuery'
hal_search(
query,
path = "search",
instance = NULL,
limit = 30,
start = 0,
cursor = FALSE,
simplify = TRUE,
progress = getOption("odyssey.progress"),
verbose = getOption("odyssey.verbose"),
...
)
Arguments
- query
An object of class
HALQuery
(typically returned byhal_query()
).- ...
Currently not used.
- path
description
- instance
description
- limit
An
integer
giving the maximum number of results. According to HAL policy, it cannot exceed 10000.- start
An
integer
specifying an absolute offset in the complete sorted list of matches to be used as the beginning of the current page. Only used ifcursor
isFALSE
.- cursor
A
logical
scalar: should a cursor be used for the pagination of results? IfTRUE
, thesort
parameter of the query will set to "docid asc
".- simplify
A
logical
scalar. IfTRUE
(the default), (try to) coerce to adata.frame
.- progress
A
logical
scalar: should a progress bar for for the request be printed?- verbose
A
logical
scalar: should extra information be reported?
Value
hal_count()
returns aninteger
(the number of results).hal_search()
returns a (list
of)data.frame
(according tosimplify
).
See also
Other search tools:
hal_download()
Examples
if (FALSE) { # \dontrun{
## Simple search
topic <- list("archéologie", "Celtes", "France") # Combined with AND
## Get the first ten results
docs <- hal_query(topic) |>
hal_search(limit = 10)
## Get all results
docs <- hal_query(topic) |>
hal_search(limit = 30, cursor = TRUE)
## Get a list of archaeological journals
topic <- c("archéologie", "archaeology", "archäologie") # Combined with OR
journ <- hal_query(topic) |>
hal_select("title_s", "issn_s") |>
hal_filter("" %TO% "*" %IN% "issn_s") |>
hal_sort("title_s") |>
hal_search(path = "ref", instance = "journal")
## Get a list of archaeological laboratories
## (only joint laboratories of the CNRS and a French university)
topic <- list("archéologie" %IN% "text", "UMR" %IN% "code_t")
labs <- hal_query(topic) |>
hal_select("name_s", "acronym_s", "code_s") |>
hal_filter("VALID" %IN% "valid_s") |>
hal_sort("acronym_s", decreasing = TRUE) |>
hal_search(path = "ref", instance = "structure", limit = 15)
} # }