ncaa2010: NCAA Division I Basketball Results

Description Usage Format Source Examples

Description

Results of NCAA basketball games

Usage

1
2
3
4
5

Format

Seven variables describing NCAA Division I basketball games.

date

date on which game was played

away

visiting team

ascore

visiting team's score

home

home team

hscore

home team's score

notes

code indicting games played at neutral sites (n or N) or in tournaments (T)

location

where game was played

Source

kenpom.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data(ncaa2010)
# add some additional variables to the data frame
ncaa2010$dscore <- ncaa2010$hscore- ncaa2010$ascore
ncaa2010$homeTeamWon <- ncaa2010$dscore > 0
ncaa2010$numHomeTeamWon <- -1 + 2 * as.numeric(ncaa2010$homeTeamWon)
w <- which(ncaa2010$homeTeamWon)
ncaa2010$winner <- as.character(ncaa2010$away)
ncaa2010$winner[w] <- as.character(ncaa2010$home)[w]
ncaa2010$loser <- as.character(ncaa2010$home)
ncaa2010$loser[w] <- as.character(ncaa2010$away)[w]
ncaa2010$homeTeamWon <- ncaa2010$winner == ncaa2010$home
ncaa2010$numHomeTeamWon <- -1 + 2 * as.numeric(ncaa2010$homeTeamWon)

fastR documentation built on May 2, 2019, 5:53 p.m.