#changing data type from string to date and time
calories$ActivityMinute <- as.POSIXct(calories$ActivityMinute, format="%Y/%m/%d %H:%M:%S", tz="UTC")
heart_rate$Time <- as.POSIXct(heart_rate$Time, format="%Y/%m/%d %H:%M:%S", tz="UTC")
steps$ActivityMinute <- as.POSIXct(steps$ActivityMinute, format="%Y/%m/%d %H:%M:%S", tz="UTC") #check if changes has been made correctly
class(calories$ActivityMinute)
class(heart_rate$Time)
class(steps$ActivityMinute)
At first when i ran this on r markbook it worked perfectly fine but now it shows NA in that column.
sample of data Calories data set
ID TIME VALUE
|1|2022484408|4/12/2016 7:21:00 AM|97||
|2|2022484408|4/12/2016 7:21:05 AM|102||
|3|2022484408|4/12/2016 7:21:10 AM|105||
|4|2022484408|4/12/2016 7:21:20 AM|103||
|5|2022484408|4/12/2016 7:21:25 AM|101||
|6|2022484408|4/12/2016 7:22:05 AM|95||