Description Usage Arguments Value Examples
View source: R/accessors-month.r
Date-time must be a POSIXct, POSIXlt, Date, Period, chron, yearmon, yearqtr, zoo, zooreg, timeDate, xts, its, ti, jul, timeSeries, and fts objects.
1 2 3 | month(x, label = FALSE, abbr = TRUE, locale = Sys.getlocale("LC_TIME"))
month(x) <- value
|
x |
a date-time object |
label |
logical. TRUE will display the month as a character string such as "January." FALSE will display the month as a number. |
abbr |
logical. FALSE will display the month as a character string label, such as "January". TRUE will display an abbreviated version of the label, such as "Jan". abbr is disregarded if label = FALSE. |
locale |
for month, locale to use for month names. Default to current locale. |
value |
a numeric object |
If label = FALSE
: month as number (1-12, 1 = January, 12 = December),
otherwise as an ordered factor.
1 2 3 4 5 6 7 8 9 10 |
Attaching package: 'lubridate'
The following object is masked from 'package:base':
date
[1] 3
[1] FALSE
[1] 1
[1] Jan
12 Levels: Jan < Feb < Mar < Apr < May < Jun < Jul < Aug < Sep < ... < Dec
[1] January
12 Levels: January < February < March < April < May < June < ... < December
[1] Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
12 Levels: Jan < Feb < Mar < Apr < May < Jun < Jul < Aug < Sep < ... < Dec
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.