ct_instant: Make an "instant" data frame

Description Usage Arguments Details Value Examples

Description

This could be used in a dygraph, for instance.

Usage

1
2
3
ct_instant(ct, channel_type = c("analog", "digital"),
  channel_name = ct_attr("ph"), use_timestamp = FALSE, side = c("primary",
  "secondary"))

Arguments

ct

comtrade S3 object constructed using comtrade()

channel_type

character to indicate which channel types to return. Default is to return both "analog" and "digital".

channel_name

list or function - list has two members: analog and digital - each of which is a vector of character column-names. function must take one argument, ct, and return such a list of names. A convenience function, ct_attr() is provided.

use_timestamp

logical to use the timestamp provided in the data file, or to use the sampling-rate provided in the configuration file.

side

character to indicate if we want primary or secondary values

Details

The data frame returned has a column called instant, which is a double representing the time (s) since the start of the waveform. The remaining columns represent the the channels in the comtrade object, and are named according to the channel_name argument.

Value

data frame

Examples

1

ijlyttle/ieeecomtrade documentation built on May 18, 2019, 3:41 a.m.