I've tried this using nbastatR:
library(nbastatR)
assign_nba_players()
players <- df_dict_nba_players$idPlayer
nba_careers <- players_careers(player_ids= players, modes="PerGame")
But it just ran for multiple days straight. Eventually, I checked Task Manager and saw that "RStudio R Session" was taking up 0 computing power. So I terminated the program. This appears to be a good alternative, but I'm not sure how to get the csv file I need and convert it into a tbl in RStudio. I'm only a few weeks old to R, so any help would be greatly appreciated. Thanks!
I've got some code using
rvestto scrape Basketball-Reference here, that gets individual-level statistics for box scores by year: https://github.com/markhwhiteii/blog/blob/master/sloppy_play/sloppy_scraping.R