ISOweekday {ISOweek}R Documentation

Day of week according to ISO 8601

Description

This function returns the weekday of a given date according to ISO 8601. It is an substitute for the "%u" format which is not implemented on Windows.

Usage

  ISOweekday(date)

Arguments

date

Vector which can be coerced to class Date

Value

An integer vector of weekdays (1-7, Monday is 1)

Author(s)

Uwe Block u.block.mz@googlemail.com

See Also

strptime

Examples

x <- paste(1999:2011, "-12-31", sep = "")
y <- as.Date(x)
data.frame(date = format(y), weekday = ISOweekday(y))
data.frame(date = x, weekday = ISOweekday(x))

[Package ISOweek version 0.6-2 Index]