Thank you for the advice.
I wanted to create a time lapse thing.
It is what I just created: the problem laid in these lines of code:
suspicious <- fil_calls %>%
mutate(Year = format(as.Date(Date, "%m/%d/%Y"), format = "%Y")) %>%
mutate(Hour = format(strptime(Time, "%H:%M:%S"), '%H')) %>%
select(Hour, Year,Date, DayOfWeek, Category, Descript, PdDistrict, X, Y, Location)
and
suspicious <- fil_calls %>%
mutate(Year = format(as.Date(Date, "%m/%d/%Y"), format = "%Y")) %>%
mutate(Date = format(as.Date(Date, "%m/%d/%Y"))) %>%
mutate(Hour = format(strptime(Time, "%H:%M:%S"), '%H')) %>%
select(Hour, Year,Date, DayOfWeek, Category, Descript, PdDistrict, X, Y, Location)
I had to properly convert the date from char to date. My old code was ineffective.
Then erased:
mutate(Date = format(as.Date(Date, "%m/%d/%Y"))) %>%
of code because it would overwrite the date and transform it back to a char.
I hopefully did a better job at breaking it down utilizing the reprex approach