I am trying to convert a column of feet to inches. Usually it is simple multiplication, but I am confused on how to convert when the format is (5-10) or (6-2) for 70 and 74 inches respectively. Here is my code so far. I am trying to change combine.data$Ht
library(rvest)
library(magrittr)
library(dplyr)
library(purrr)
years <- 2010:2020
urls <- paste0(
'https://www.pro-football-reference.com/draft/',
years,
'-combine.htm')
combine.data <- map(
urls,
~read_html(.x) %>%
html_nodes(".stats_table") %>%
html_table() %>%
as.data.frame()
) %>%
set_names(years) %>%
bind_rows(.id = "year") %>%
filter(Pos == 'CB' | Pos == "S")