Hello everyone,
I'm trying to do sports analytics API and I'm getting an error when I tried to run the code "data" that says. My code is also below.
"Error: lexical error: invalid char in json text.
<html lang="en"
(right here) ------^.
res<-GET("https://www.landofbasketball.com/championships/year_by_year.htm ") #response of the API server to my request
data<-fromJSON(rawToChar(res$content)) #conver raw Unicode to character vecto
Hi, and welcome!
Please see the FAQ: What's a reproducible example (`reprex`) and how do I do one? Using a reprex, complete with representative data will attract quicker and more answers.
I'm probably not the right guy to answer this based on my toolkit, but others in the community are more geared to this. A reprex
will make it easier for them.
system
Closed
April 30, 2020, 12:13am
3
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.