Dears,
I've been trying to read CSV data and i have the following code:
d_recovered <- recovered %>%
pivot_longer(-c(Province.State
,Country.Region
, Lat, Long), names_to = "date" , values_to = "recovered_num") %>%
clean_names() %>%
mutate(
date = as.Date(date, format = "%m/%d/%y")
) %>%
group_by(date, country_region) %>%
summarise(recovered_num = sum(recovered_num))
the question here is that how can i get red of X and replace it with Zero in the date column as it appears when i tried to read the file.
The dataset looks like the following:
and because of the X letter appeared in the date column i got NA values