This function converts a single data frame that has subentity-level list columns in it into multiple data frames, one for each entity/subentity. The multiple data frames can be merged together using the primary key variable specified by the user (see the relational data chapter in "R for Data Science" for an in-depth introduction to joining tabular data).
Usage
unnest_pv_data(data, pk = lifecycle::deprecated())Arguments
- data
The data returned by
search_pv. This is the first element of the three-element result object you got back fromsearch_pv. It should be a list of length 1, with one data frame inside it. See examples.- pk
. should be the unique identifier for the primary entity. For example, if you used the patent endpoint in your call to
search_pv, you could specifypk = "patent_id". This identifier has to have been included in yourfieldsvector when you calledsearch_pv. You can useget_ok_pkto suggest a potential primary key for your data.