I'm trying to get 2018 'Player Standard Batting' table from baseball-reference.com. there are multiple tables on the URL page and when i run the following code. I'm only able to get the first table in the table list. I need the second table which is the player standard batting.
library(rvest)
url <- "https://www.baseball-reference.com/leagues/MLB/2018-standard-batting.shtml"
pg <- read_html(url)
tb <- html_table(pg, fill = TRUE)
df_batting <- tb[[1]]