I'm unable to run transform_data() successfully. Running line-by-line, the final line before returning data fails at:
data <- tsibble::as_tsibble(data, index = time_col, regular = regular)
The error states that there are multiple columns named time in data.
I believe this is caused by the following line:
data <- cbind(data, neg_der_log_bounded, time)
I suggest the following, which avoids binding the time column which is already contained in data:
data <- cbind(data, neg_der_log_bounded)
I'm unable to run transform_data() successfully. Running line-by-line, the final line before returning data fails at:
data <- tsibble::as_tsibble(data, index = time_col, regular = regular)The error states that there are multiple columns named
timeindata.I believe this is caused by the following line:
data <- cbind(data, neg_der_log_bounded, time)I suggest the following, which avoids binding the
timecolumn which is already contained indata:data <- cbind(data, neg_der_log_bounded)