0

I am trying to extract some patent data from PatentsView using R and the patentsview package.

I have specified the queries and fields and run the search_pv to obtain the data.

This is my code:

# Define query:

query1 = with_qfuns(
  and(
  gte(app_date = "1968-01-01"),
  lte(app_date = "1975-01-01")
  )
)

# Define fields

fields = c("forprior_date", "app_date", "patent_year", "patent_number", "inventor_country", "uspc_subclass_id" )

# Retrieve data

result = search_pv(query = query1, fields = fields, endpoint = "patents", matched_subentities_only = TRUE, all_pages = TRUE,  method = "GET")

The codes run ok, but what I get as "result" is a "large list" of 3 elements: data, query_results and request. Each of these is a list and within data I have multiple lists. I also have the dataframe "patents" but instead of values it has multiple mini-dataframes as the rows (see picture). dataframe "patents" that instead of values has multiple mini-dataframes as the rows

What am I doing wrong and how can I get a unique dataframe with the data I need?

Thank you!

Cecilia
  • 19
  • 4

0 Answers0