Group Results
Usage
hal_group(query, ...)
# S3 method for class 'HALQuery'
hal_group(query, field, limit = 20, sort = "score", decreasing = FALSE, ...)
Arguments
- query
An object of class
HALQuery
(typically returned byhal_query()
).- ...
Currently not used.
- field
A
character
string specifying the field to group by.- limit
An
integer
giving the maximum number of results per group.- sort
A
character
string specifying the field to be used to sort the results.- decreasing
A
logical
scalar: should the sort be increasing or decreasing?
Value
An object of class HALQuery
.
See also
Other query tools:
hal_facet()
,
hal_filter()
,
hal_query()
,
hal_select()
,
hal_sort()
,
operators
Examples
if (FALSE) { # \dontrun{
## Get the most recent archaeological publication (in French) by journal
hal_query("archéologie") |>
hal_filter("ART" %IN% "docType_s") |>
hal_select("producedDate_tdate", "docid") |>
hal_sort("producedDate_tdate", decreasing = TRUE) |>
hal_group(
field = "journalTitle_s",
sort = "producedDate_tdate",
decreasing = TRUE
) |>
hal_search()
} # }