ChangeTimeVar {ActiSleep} | R Documentation |
Reformat Time Variable
Description
Reformat the time variable to match analysis-ready format
Usage
ChangeTimeVar(datain, col_idx, format = "%Y-%m-%d %H:%M:%S")
Arguments
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 |
Value
dataframe with formatted time values
Examples
data("SleepDiary1Week")
ChangeTimeVar(
SleepDiary1Week,
col_idx = c(5:18),
format = "%Y-%m-%d %H:%M:%S")
[Package ActiSleep version 0.2.2 Index]