select_timeDF: Function to select columns in timeDF object

View source: R/select_timeDF.R

select_timeDFR Documentation

Function to select columns in timeDF object

Description

select_timeDF function

Usage

select_timeDF(timeDF, colnames)

Arguments

timeDF

timeDF object

colnames

column names to be selected, chracter vector

Details

select_timeDF function returns a new timeDF object with columns specified and the column holding time information.

Value

timeDF object

See Also

timeDF-class

Examples

time_df = data.frame(
    time = c("2023-12-01 01:00:00",
             "2023-12-01 05:00:00",
             "2023-12-01 09:00:00",
             "2023-12-01 13:00:00",
             "2023-12-01 17:00:00",
             "2023-12-01 21:00:00"),
    value = c(123,
              144,
              150,
              100,
              200,
              180),
    phase = c("A",
              "A",
              "B",
              "B",
              "C",
              "C")
)
timeDF = as.timeDF(time_df)
select_timeDF(timeDF, c("phase"))

timeDF documentation built on May 29, 2024, 5:12 a.m.