Skip to content

Commit 54a3540

Browse files
committed
13-N.Dorka, Jr.
1 parent 973e1a4 commit 54a3540

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

R/cleanPlayers.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ cleanPlayers <- function(x){
2020
# Players with single qoute in name...
2121
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)
2222

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

2529
}

tests/testthat/test_cleanPlayers.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ TestFrame <- data.frame(
66
,"7-G.Hankerson complete to 15-M. Street. 15-M. Street to NFS 47 for 10 yards."
77
,"19-T.St.Germain punts 50 yards from NIC 9 to ULM 41, fair catch by 8-J.Williams."
88
,"8-T.Figaro complete to 3-D.Watson II. 3-D.Watson II to ULM 26 for 8 yards."
9+
,"13-N.Dorka, Jr. 21 yards Field Goal is Good."
910
)
1011
)
1112

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

0 commit comments

Comments
 (0)