This package contains the University of North Carolina (UNC) Men’s basketball team’s (and their archrival Duke’s) match results since 1949-1950 season with select match attributes. Base match records are obtained from the source (1) below and augmented from the source (2):
Any data discrepancies are fixed once they are identified.
# Install the released version from CRAN
install.packages("uncmbb")
Or install the development version from GitHub with:
# install.packages("devtools")
devtools::install_github("joongsup/uncmbb")
```R library(uncmbb) library(dplyr)
tail(unc) Season Game_Date Game_Day Type Where Opponent_School Result Tm Opp OT 2187 2018 2018-03-07 Wed CTOURN N Syracuse W 78 59
unc %>% filter(Type == “NCAA”) %>% group_by(Season) %>% summarize(wins = sum(Result == “W”), losses = sum(Result == “L”)) %>% filter(losses == 0)
Season wins losses
duke %>% group_by(Season) %>% summarize(wins = sum(Result == “W”), losses = sum(Result == “L”), win_perc = round(wins/(wins + losses), 2)) %>% arrange(desc(win_perc)) %>% head(5)
Season wins losses win_perc