find_weekends: Find Weekends

Description Usage Arguments Value Examples

View source: R/data-clean.R

Description

Finds the weekends in a date vector and returns a respective index.

Usage

1

Arguments

dates

a date vector.

Value

an index vector for the position of weekends.

Examples

1
2
3
data(sp500)
dates <- as.Date(sp500[,1], format="%d.%m.%Y", stringsAsFactors=FALSE)
index_weekends <- find_weekends(dates)

antshi/auxPort documentation built on Oct. 27, 2020, 1:16 p.m.