ChangeTimeVar {ActiSleep} | R Documentation |
Reformat the time variable to match analysis-ready format
ChangeTimeVar(datain, col_idx, format = "%Y-%m-%d %H:%M:%S")
datain |
input dataset, must be a data frame |
col_idx |
index of column to convert to date object |
format |
format of input date data, default is YYYY-MM-DD HH:MM:SS |
dataframe with formatted time values
data("SleepDiary1Week")
ChangeTimeVar(
SleepDiary1Week,
col_idx = c(5:18),
format = "%Y-%m-%d %H:%M:%S")