Skip to content

Commit

Permalink
13-N.Dorka, Jr.
Browse files Browse the repository at this point in the history
  • Loading branch information
JackStat committed Sep 27, 2015
1 parent 973e1a4 commit 54a3540
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions R/cleanPlayers.R
Expand Up @@ -20,6 +20,10 @@ cleanPlayers <- function(x){
# Players with single qoute in name...
x$scoreText <- gsub("([0-9]{0,3}-[A-Z]{1,1}\\.[A-Z]{1,1})'([A-Z]{1,1}[a-z]{1,20})",'\\1-\\2', x$scoreText)

# 13-N.Dorka, Jr.
x$scoreText <- gsub("([0-9]{0,3}-[A-Z]{1,1}\\.[A-Z]{1,1}[a-z]{1,20}), (Jr)\\.",'\\1-\\2', x$scoreText)


x

}
2 changes: 2 additions & 0 deletions tests/testthat/test_cleanPlayers.R
Expand Up @@ -6,6 +6,7 @@ TestFrame <- data.frame(
,"7-G.Hankerson complete to 15-M. Street. 15-M. Street to NFS 47 for 10 yards."
,"19-T.St.Germain punts 50 yards from NIC 9 to ULM 41, fair catch by 8-J.Williams."
,"8-T.Figaro complete to 3-D.Watson II. 3-D.Watson II to ULM 26 for 8 yards."
,"13-N.Dorka, Jr. 21 yards Field Goal is Good."
)
)

Expand All @@ -20,6 +21,7 @@ test_that("Player names are correctly cleaned", {
,"7-G.Hankerson complete to 15-M.Street. 15-M.Street to NFS 47 for 10 yards."
,"19-T.St-Germain punts 50 yards from NIC 9 to ULM 41, fair catch by 8-J.Williams."
,"8-T.Figaro complete to 3-D.Watson-II. 3-D.Watson-II to ULM 26 for 8 yards."
,"13-N.Dorka-Jr 21 yards Field Goal is Good."
)
)
})
Expand Down

0 comments on commit 54a3540

Please sign in to comment.