cch_pkgs_search: Search historical package check data

View source: R/cch_pkgs_search.R

cch_pkgs_searchR Documentation

Search historical package check data

Description

Search historical package check data

Usage

cch_pkgs_search(
  q,
  package = NULL,
  one_each = FALSE,
  fields = NULL,
  limit = 30,
  offset = 0,
  ...
)

Arguments

q

(character) full text query string

package

(character) a package name. limit results to a single package, e.g, package="taxize"

one_each

(logical) if TRUE, return a single result for each package; useful if you want to find out what packages match a particular query, and don't care which day that match happened. default: FALSE

fields

(character) vector of fields to return, e.g., fields=c("package", "check_details")

limit

number of records to return. Default: 10

offset

record number to start at. Default: 0

...

Curl options passed to crul::HttpClient() or crul::Async()

Value

list of info about a package(s)

Examples

## Not run: 
x <- cch_pkgs_search(q = "memory")
x
x$data
x$data$package
x$data
x$data$summary
x$data$summary$any
x$data$check_details

# restrict returned fields
res <- cch_pkgs_search("memory", fields = c("package", "check_details"))
res$data$check_details$output[1]
grepl('memory', res$data$check_details$output[1])

# one each, one record per package
res <- cch_pkgs_search("memory", one_each = TRUE,
  fields = c("package", "date_updated"))
res

# pagination
cch_pkgs_search("memory", limit = 3)
cch_pkgs_search("memory", limit = 3, offset = 4)

## End(Not run)

ropenscilabs/cchecks documentation built on Sept. 14, 2022, 3:54 a.m.