TemporalIndicators: Create temporal indicators

Description Usage Arguments Value Examples

View source: R/tempind.R

Description

Create temporal indicators

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
TemporalIndicators(
  Dates,
  DATEnum = TRUE,
  DOW = TRUE,
  week_start_in = 1,
  YEAR = TRUE,
  DOY = TRUE,
  WEEK = TRUE,
  NWD = "Individual",
  SWAP = TemporalIndicators::SwappedWorkingDays,
  Congresses = NULL,
  CongressDatesIn = TemporalIndicators::CongressDates,
  CongPrePost = TRUE,
  SDAY = TRUE,
  MONTH = TRUE,
  SEASON = TRUE
)

Arguments

Dates

The vector of dates from which the indicators should be calculated

DATEnum

Numeric dates needed?

DOW

Day-of-week indicator needed?

week_start_in

Day on which week starts (1: Monday, 7: Sunday)

YEAR

Year indicator needed?

DOY

Day-of-year indicator needed?

WEEK

Week indicator needed?

NWD

Non-working day indicator needed? (NULL if not, "None" if needed but without pre/post indicators, "Global" if needed with one single pre/post indicator, regardless of the non-working day, "Individual" if an own pre/post indicator is needed for each non-working day individually)

SWAP

Swapped working day indicator needed? (NULL if not, a data frame with columns 'date' (date of swap) and 'name' (names, e.g. 'Non-working day' and 'Working day' ) if yes)

Congresses

What congress indicators are needed? (NULL if none, list of congresses otherwise)

CongressDatesIn

Data frame that holds the dates of congresses with columns 'CongressName' (name of the congress), 'StartDate' (starting date), 'EndDate' (end date)

CongPrePost

Pre/post indicators for the congress(es) needed?

SDAY

Semmelweis Day indicator needed?

MONTH

Month indicator needed?

SEASON

Season indicator needed?

Value

A data frame containing the requested indicators in its columns

Examples

1
TemporalIndicators( seq( as.Date( "2018-01-01" ), as.Date( "2019-03-31" ), by = "days" ) )

tamas-ferenci/TemporalIndicators documentation built on Sept. 6, 2020, 7:37 a.m.