weekday: Week-day names

Description Usage Arguments Details Examples

View source: R/weekday.R

Description

Convert numeric, character, factor and date-time vectors to week-day names

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
weekday(x, ...)

## Default S3 method:
weekday(x, short = TRUE, language = c("english",
  "nn norwegian", "bm norwegian"), ...)

## S3 method for class 'Date'
weekday(x, ...)

## S3 method for class 'POSIXt'
weekday(x, ...)

Arguments

x

a vector

...

further arguments passed to methods

short

if TRUE the names will be returned in shortened form

language

what language the names should be returned in

Details

This function follows the ISO 8601 standard, meaning that Monday is considered the first day of the week.

Examples

1
2
3
4
5
6
weekday(c("c", "b", "a"))
weekday(c("3", "2", "1"))
weekday(3:1)

weekday(Sys.Date())
weekday(Sys.Date(), short=FALSE, lang="nn nor")

AkselA/R-ymse documentation built on March 21, 2020, 9:52 a.m.