Create meter_df, which is essentially a data.frame with standardized meter data series

meter_df(..., stringsAsFactors = default.stringsAsFactors())

Arguments

...

column elements to be binded into an meter_df object or a data.frame with required columns. One element must be a time index and at least one should have measured values with units set, see set_units

stringsAsFactors

logical; logical: should character vectors be converted to factors? The `factory-fresh' default is TRUE, but this can be changed by setting options(stringsAsFactors = FALSE).

Examples

library("units") x <- data.frame(time = seq.Date(as.Date("2013-1-1"), by = "+1 month", length.out = 12), value = set_units(rnorm(12), kW)) meter_df(x)
#> time value #> 1 2013-01-01 -1.400043517 kW #> 2 2013-02-01 0.255317055 kW #> 3 2013-03-01 -2.437263611 kW #> 4 2013-04-01 -0.005571287 kW #> 5 2013-05-01 0.621552721 kW #> 6 2013-06-01 1.148411606 kW #> 7 2013-07-01 -1.821817661 kW #> 8 2013-08-01 -0.247325302 kW #> 9 2013-09-01 -0.244199607 kW #> 10 2013-10-01 -0.282705449 kW #> 11 2013-11-01 -0.553699384 kW #> 12 2013-12-01 0.628982042 kW