get_fields: Get list of retrievable fields

Description Usage Arguments Value Examples

Description

This function returns a vector of fields that you can retrieve from a given API endpoint (i.e., the fields you can pass to the fields argument in search_pv). You can limit these fields to only cover certain entity group(s) as well (which is recommended, given the large number of possible fields for each endpoint).

Usage

1
get_fields(endpoint, groups = NULL)

Arguments

endpoint

The API endpoint whose field list you want to get. See get_endpoints for a list of the 7 endpoints.

groups

A character vector giving the group(s) whose fields you want returned. A value of NULL indicates that you want all of the endpoint's fields (i.e., do not filter the field list based on group membership). groups can be one or more of the following, depending on the value of endpoint: "applications", "assignees", "cpcs", "gov_interests", "inventors", "ipcs", "locations", "nbers", "patents", "rawinventors", "uspcs", "wipos", "years", "cpc_subsections", "cpc_subgroups", "coinventors", "application_citations", "cited_patents", "citedby_patents", "nber_subcategories", "uspc_mainclasses", and "uspc_subclasses". See the field tables located online to see which fields correspond to which groups (e.g., the patents endpoint field list table).

Value

A character vector with field names.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# Get all assignee-level fields for the patents endpoint:
fields <- get_fields(endpoint = "patents", groups = "assignees")

#...Then pass to search_pv:
search_pv(
  query = '{"_gte":{"patent_date":"2007-01-04"}}',
  fields = fields
)

# Get all patent and assignee-level fields for the patents endpoint:
fields <- get_fields(endpoint = "patents", groups = c("assignees", "patents"))

#...Then pass to search_pv:
search_pv(
  query = '{"_gte":{"patent_date":"2007-01-04"}}',
  fields = fields
)

crew102/patentsview documentation built on May 14, 2019, 11:33 a.m.