This will cast the data fields returned by search_pv
so that
they have their most appropriate data types (e.g., date, numeric, etc.).
cast_pv_data(data)
data | The data returned by |
---|
The same type of object that you passed into cast_pv_data
.
fields <- c("patent_date", "patent_title", "patent_year") res <- search_pv(query = "{\"patent_number\":\"5116621\"}", fields = fields) cast_pv_data(data = res$data)#> #### A list with a single data frame on a patent level: #> #> List of 1 #> $ patents:'data.frame': 1 obs. of 3 variables: #> ..$ patent_date : Date[1:1], format: "1992-05-26" #> ..$ patent_title: chr "Anti-inflammatory analgesic patch" #> ..$ patent_year : int 1992