as.Date.aweek | R Documentation |
Convert aweek objects to characters or dates
## S3 method for class 'aweek' as.Date(x, floor_day = FALSE, ...) ## S3 method for class 'aweek' as.POSIXlt(x, tz = "", floor_day = FALSE, ...) ## S3 method for class 'aweek' as.character(x, ...)
x |
an object of class aweek. |
floor_day |
when |
... |
parameters passed to |
tz |
passed on to |
date2week()
print.aweek()
w <- date2week(Sys.Date(), week_start = "Sunday") w # convert to POSIX as.POSIXlt(w) as.POSIXlt(w, floor_day = TRUE) as.POSIXlt(w, floor_day = TRUE, tz = "KST") # convert to date as.Date(w) as.Date(w, floor_day = TRUE) # convert to character (strip attributes) as.character(w)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.