0

I am trying to use the spotifyR package to analyze my spotify data in R. However, when I try to run this code:

library(spotifyr)
# Top Artists Analysis
topArtists <- get_my_top_artists_or_tracks(type = "artists", limit = 5, 
                                           time_range = "medium_term",
                                           authorization = access_token)

I get these errors:

> Error: $ operator is invalid for atomic vectors
> Request failed [ERROR]. Retrying in 1.1 seconds...
> Error: $ operator is invalid for atomic vectors
> Request failed [ERROR]. Retrying in 1.2 seconds...
> Error: $ operator is invalid for atomic vectors

I made sure my syntax is correct for the spotifyR package, and I have ensured that I am using the correct access token (stored in access_token). Not exactly sure where there is an atomic vector anywhere in this code or data that I am pulling.

  • Have you posted this issue to the project github? Seems like a dup of https://github.com/charlie86/spotifyr/issues/178 Hopefully the package author will be able to respond. It's hard for us to test without a self contained [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) that doesn't require private access tokens to test. – MrFlick May 02 '22 at 19:07

0 Answers0