append_metadate_cols: RM2C2dev

Description Usage Arguments Examples

View source: R/append_metadate_cols.R

Description

RM2C2dev

Usage

1
2
3
4
5
6
7
8
append_metadate_cols(
  data,
  time_var = "timestamp",
  time_format = "%m/%d/%Y",
  time_origin = "1970-01-01",
  timezone = Sys.timezone(),
  append_rounded = T
)

Arguments

data

class: data.frame

time_var

class: string

time_format

class: string

time_origin

class: string

timezone

class: string

append_rounded

class: boolean

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
append_metadate_cols(data, time_var = 'timestamp')
parameter validation
verify data passed in is data.frame or tibble
append date features
pass in time_stamp as string and convert to date time object (as.POSIXct)
append date and time features
add weekend label
append rounded date timestamps if requested
append rounded date timestamps if requested
append rounded timestamps if requested
if data is valid, stop code execution and present an error message

nelsonroque/ruf documentation built on March 11, 2021, 2:53 p.m.