har_source_dataframe: Data-frame source

View source: R/har_online_sources.R

har_source_dataframeR Documentation

Data-frame source

Description

Convenience wrapper around har_source_simulated() for table-shaped inputs.

Usage

har_source_dataframe(
  data,
  timestamp_col = NULL,
  value_cols = NULL,
  name = "dataframe"
)

Arguments

data

Data frame in time order.

timestamp_col

Optional timestamp column name or position.

value_cols

Optional value columns. Defaults to all columns except the timestamp column when provided.

name

Source name.

Value

A har_source_dataframe object.

Examples

df <- data.frame(ts = 1:3, value = c(10, 11, 9))
source <- har_source_dataframe(df, timestamp_col = "ts", value_cols = "value")
obs <- next_observation(source)
obs$observation$timestamp

harbinger documentation built on July 10, 2026, 5:07 p.m.