I'm currently using Rstudio and running this code:
{r top_3pt_scorers, echo = FALSE}
top_3pt_shooters <- NBAdf %>%
filter(PTS_TYPE == 3) %>%
group_by(PLAYER_NAME) %>%
dplyr::summarize(Threes_attempted = n(), Threes_made = sum(as.numeric(FGM)),
Three_point_total = sum(PTS, na.rm = TRUE))
knitr::kable(head(top_3pt_shooters[order(top_3pt_shooters$Threes_made, decreasing = TRUE), ]),
caption = "The top 3 point scorers in the NBA")
But I'm getting this output:
Whereas my ideal output is:
Do I need to change something within the kable argument?
Solution:
To solve this issue, I just had to change the following code:
{r top_3pt_scorers, echo = FALSE}
to
{r top3ptscorers, echo = FALSE}