Scopus returns a service error for this. I haven't checked whether this happens for other article identifiers, but looking at the code it seems to be generic.
In both functions, the problem is an interaction between the line
which prepends one /, and the fact that, in generic_elsevier_api, the large switch statement for search_type returns NULL when type == 'abstract' or 'article'. Then the line
The functions
article_retrieval
andabstract_retrieval
add an extra/
to the URLs they generate.Ex:
Message output:
Scopus returns a service error for this. I haven't checked whether this happens for other article identifiers, but looking at the code it seems to be generic.
In both functions, the problem is an interaction between the line
which prepends one
/
, and the fact that, ingeneric_elsevier_api
, the largeswitch
statement forsearch_type
returnsNULL
whentype == 'abstract'
or'article'
. Then the lineis equivalent to
which returns
'http://api.elsevier.com/content/abstract/'
.I see two potential fixes.
In
abstract_retrieval
andarticle_retrieval
, replace the problem line with something likewhich no longer prepends one '/'.
In
generic_elsevier_api
, usestringr::str_c
in place ofpaste
. https://cran.r-project.org/web/packages/stringr/index.html. This function ignores 0-length strings, including nulls. Ex:returns