Learn R Programming

mtconnectR (version 1.0.0)

mergeTS: Merges all the data.frames in the list into single data.frame

Description

Merges all the data.frames in the list into single data.frame

Usage

mergeTS(DF_list, output_DF = T, use_list_names = F, additional_ts = .POSIXct(integer(0)))

Arguments

DF_list
is a list of data.frames. Each data.frame should be of type timestamp|value1|value2...
output_DF
if TRUE, then returns output in the form of data.frame instead of data.table
use_list_names
if TRUE, the names of the list are assigned the columns names
additional_ts
an POSIXct vector of timestamps which needs to be added into the table. The values are repeated from the previous timestamp

Examples

Run this code
data("example_mtc_device")
mtc_device = merge(example_mtc_device)
df_1 = mtc_device[seq(1,17,2),]
df_2 = mtc_device[seq(2,17,2),]
merged_df = mergeTS(list(df_1,df_2))

Run the code above in your browser using DataLab