Select Fields

hal_select(x, ...)

# S3 method for HALQuery
hal_select(x, ...)

Arguments

x

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

...

One or more character string separated by commas giving the fields to be returned.

Value

An object of class HALQuery.

See also

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

Author

N. Frerebeau

Examples

library(magrittr)

## Select fields
hal1 <- hal_api() %>% hal_select("label_s")
hal1$fl
#> [1] "label_s"

hal2 <- hal_api() %>% hal_select("halId_s", "uri_s")
hal2$fl
#> [1] "halId_s" "uri_s"  

## Update query
hal3 <- hal_select(hal1, "docType_s")
hal3$fl
#> [1] "docType_s"