Skip to contents

Searches the data, code or papers in ResearchBox's public boxes. A data search returns one row per matching variable, a code search one row per matching file, and a paper search one row per matching box. Needs an API key (see rbox_token()).

Usage

rbox_search(q, type = c("data", "code", "paper"), limit = 100, offset = 0)

Arguments

q

the search text (at least two characters)

type

what to search: "data", "code" or "paper"

limit

the most hits to return; Inf for all of them

offset

the number of hits to skip, to continue an earlier search

Value

a data frame with one row per hit: rb_url and the columns ResearchBox gives for that type (box_id, formatted_reference, and for data file_id, var_id, var_name, var_description, original_name and upload_time; for code file_id, original_name and upload_time; for papers box_title). The attribute "total" is the number of hits ResearchBox found, which can be more than were returned.

Details

ResearchBox returns at most 100 hits per request, so each 100 hits cost one API request. A * matches any ending of a word ("happi*").

Examples

if (FALSE) { # \dontrun{
rbox_search("happi*", type = "data")
rbox_search("ggplot", type = "code", limit = Inf)
} # }