On the subject, the function with_qfun() from {patentview} package is returning errors. For example, consider the sample code in the help of with_qfun():
Wow, I’m really late to the party but this is a bug in the R package that we didn’t know about. It’s fixed in my repo but the API team is planning to shutdown the original version of the API in favor of a new one. The shutdown was supposed to have been two days ago but the new version isn’t stable yet- leaving the updated package in limbo for now. We’ll submit the updated package to CRAN after the original version of the API is shutdown.
The fix is here devtools::install_github("mustberuss/patentsview@original-api") though it will only work until the shutdown.
The new version requires an API key which can be requested here. There are a lot of changes, just about all of them breaking changes. We’ll probably submit a Tech Note when the updated package is on CRAN. As a tease, here’s your query using the new version of the API and R package.
library(patentsview)
query <- with_qfuns(
and(
gte(patent_date = "2007-01-01"),
text_phrase(patent_abstract = c("computer program")),
or(
eq(inventors.inventor_name_last = "Ihaka"),
eq(inventors.inventor_name_first = "Chris")
)
)
)
res <- search_pv(
query = query,
timeout = 40
)
res
#> $data
#> #### A list with a single data frame on patents level:
#>
#> List of 1
#> $ patents:'data.frame': 168 obs. of 3 variables:
#> ..$ patent_id : chr [1:168] "10048105" ...
#> ..$ patent_title: chr [1:168] "System and method for providing a self valid"..
#> ..$ patent_date : chr [1:168] "2018-08-14" ...
#>
#> $query_results
#> #### Distinct entity counts across all downloadable pages of output:
#>
#> total_hits = 168