Why the following code repeatedly gives me an error?
library(rcrossref)
library(rAltmetric)
alt <- altmetrics(doi = '10.1111/j.1475-2743.2006.00029.x')
Error: lexical error: invalid char in json text.
The API key you supplied was no
(right here) ------^
In addition: Warning message:
In altmetrics(doi = "10.1111/j.1475-2743.2006.00029.x") :
Unauthorized (HTTP 401).
Any help is highly appreciated!
The rAltmetric package no longer appears to be supported and the API in the package has expired. You will have to apply directly to Altmetric for your own API.
I obtain the identical error message to you (R version 4.2.2) after installing rAltmetric from GitHub. The package was withdrawn from CRAN in June 2022 which suggests it is not currently maintained. See CRAN information for details
The information on CRAN from the above link states the following: "Package ‘rAltmetric’ was removed from the CRAN repository.
Formerly available versions can be obtained from the archive.
Archived on 2022-06-02 at the request of the maintainer."