convert_interval_to_ts: Convert Interval to Time Series

Description Usage Arguments See Also Examples

Description

Basically reverse the effect of convert_ts_to_interval. Column names should be same as mentioned in the example

Usage

1
2
convert_interval_to_ts(df, time_colname = "start", end_colname = "end",
  remove_last = F)

Arguments

df

Data.frame in start, end, duration, value1, value2,...

time_colname

Name of the time column

end_colname

Name of the end time column

remove_last

Logical value to remove the last row in the result

See Also

convert_ts_to_interval

Examples

1
2
3
4
5
6
test_interval =
  data.frame(start = as.POSIXct(c(0.5, 1, 1.008, 1.011),  tz = 'CST6CDT', origin = "1970-01-01"),
             end   = as.POSIXct(c(1, 1.008, 1.011, 2),  tz = 'CST6CDT', origin = "1970-01-01"),
             duration = c(0.50, 0.01, 0.00, 0.99),
             y     = c("e", "e", "e", "f"))
convert_interval_to_ts(test_interval)

mtconnectR documentation built on May 1, 2019, 10:38 p.m.