months: Extract numeric months of the year from a Date, POSIXct or...

Description Usage Arguments Value Examples

Description

Extract numeric months of the year from a Date, POSIXct or POSIXlt vector.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
months(date = NULL, string = TRUE, abbreviate = FALSE)

## S3 method for class 'Date'
months(date, string, abbreviate)

## S3 method for class 'POSIXct'
months(date, string, abbreviate)

## S3 method for class 'POSIXlt'
months(date, string, abbreviate)

Arguments

date

Date, POSIXct or POSIXlt vector

string

Logical, if TRUE months string is returned, otherwise numeric

abbreviate

logical. Should the months in string format be abbreviated?

Value

A vector with extracted months.

Examples

1
2
3
4
5
6
7

yapomif documentation built on May 2, 2019, 4:51 p.m.