Skip to contents

Convert Time Series Data Frame to xts Object

Usage

dataFrameToXts(
  dataFrame,
  timeColumn = names(dataFrame)[kwb.utils::posixColumnAtPosition(dataFrame)[1]]
)

Arguments

dataFrame

data frame containing a timestamp column

timeColumn

name or number of time column. Default: first POSIXt-column in dataFrame

Value

xts object with timestamps taken from timestamp column. Non-numeric columns are removed.