Learn R Programming

sugrrants (version 0.1.0)

wday2: Get weekdays component of datetime

Description

A simple wrapper of lubridate::wday(), but starts with Monday instead of Sunday.

Usage

wday2(x, label = FALSE, abbr = TRUE)

Arguments

x

Date-times.

label

Logical. If TRUE, it displays the day of the week as an ordered character strings; otherwise, an integer returns.

abbr

Logical. If TRUE, it returns an abbreviated version the label.

Value

The day of the week as a number (Monday is 1) or an ordered factor (Monday is first).

See Also

lubridate::wday