Learn R Programming

aweek (version 1.0.3)

as.data.frame.aweek: Convert aweek objects to a data frame

Description

Convert aweek objects to a data frame

Usage

# S3 method for aweek
as.data.frame(x, ...)

Value

a data frame with an aweek column

Arguments

x

an aweek object

...

unused

See Also

date2week() print.aweek()

Examples

Run this code

d  <- as.Date("2019-03-25") + 0:6
w  <- date2week(d, "Sunday")
dw <- data.frame(date = d, week = w)
dw
dw$week

Run the code above in your browser using DataLab