Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: ffpros
Title: Retrieves Data from FantasyPros
Version: 0.1.5
Version: 0.1.6
Authors@R:
person(given = "Tan",
family = "Ho",
Expand Down
4 changes: 3 additions & 1 deletion R/fp_projections.R
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,12 @@ fp_projections_parse.fp_nfl <- function(response){
team = rvest::html_text(player_labels) %>% tail(-1)
) %>%
dplyr::mutate(
#The 'highlow' string may appear in the 'team' text when max and min requested
team = stringr::str_remove(team, "highlow$"),
team = purrr::map2(.data$player_name,
.data$team,
~stringr::str_remove_all(.y,.x) %>%
stringr::str_extract_all("[A-Z]+ ") %>%
stringr::str_extract_all("[A-Z]+(\\s|$)") %>%
stringr::str_squish()) %>% unlist()
)

Expand Down