Hi, I'm new in this area, I just finished the data analyst google course, also I just finished my case study, but I have a doubt, I spent a lot of time to study, and I was able to solve many things. but i have a question about with one column (activityHour) look like this
str(H_Calories$ActivityHour)
chr [1:22099] "4/12/2016 0:00"
its a chr column, so, when I try to separate this column in date and time format, I always got an NA,. either if I use the function as.numertic, as.date, strptime, as follow:
Hourly_Intensities$ActivityHour <- as.numeric(as.character(Hourly_Intensities$ActivityHour))
Warning message:
NAs introduced by coercion
Hourly_Intensities$ActivityHour <- strptime(df$cHourly_Intensities$ActivityHour, format='%Y-%m-%d %H:%M:S', tz=Sys.timezone())
Error in df$cHourly_Intensities :
object of type 'closure' is not subsettable
I really appreciate if someone could help me in this, separate this chr column into date and time without getting and NA
I'm new in this, and I really love it, I hope can do this forever =P
thank you very much