hal_facet: Facet Search

View source: R/AllGenerics.R

hal_facetR Documentation

Facet Search

Description

Facet Search

Usage

hal_facet(x, ...)

## S3 method for class 'HALQuery'
hal_facet(
  x,
  field,
  limit = 5,
  sort = c("index", "count"),
  prefix = NULL,
  contains = NULL,
  pivot = NULL,
  range = NULL,
  ignore_case = FALSE,
  ...
)

Arguments

x

An object of class HALQuery (typically returned by hal_api()).

...

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.

prefix

A character string.

contains

A character string.

pivot

A character string.

range

A list containing the following components: "range", "start", "end", "gap".

ignore_case

A logical scalar: should character case be ignored?

Value

An object of class HALQuery.

Author(s)

N. Frerebeau

See Also

Other query tools: hal_filter(), hal_group(), hal_query(), hal_select(), hal_sort()

Examples

## Not run: 
library(magrittr)

## Most recent publication by journal
hal_api() %>%
  hal_query("archéologie") %>%
  hal_facet(
    field = "docType_s",
    limit = 100,
    sort = "count",
    range = list(
      range = "producedDateY_i",
      start = 2000,
      end = 2020,
      gap = 1
    )
  ) %>%
  hal_search(limit = 10)

## End(Not run)

nfrerebeau/odyssey documentation built on March 30, 2022, 2:51 p.m.