monthFactor: Create month-of-year factor from zoo or xts object

View source: R/monthFunctions.R View source: R/datePartFactors.R

monthFactorR Documentation

Create month-of-year factor from zoo or xts object

Description

Given a zoo or xts object, return a month factor based on the index. Factor levels are Jan, Feb, Mar, ...

Usage

monthFactor(x, ...)

monthFactor(x, ...)

## S3 method for class 'Date'
monthFactor(d)

## S3 method for class 'zoo'
monthFactor(z)

## S3 method for class 'character'
monthFactor(ch)

## S3 method for class 'yearmon'
monthFactor(ym)

Arguments

z

The zoo or xts object

Details

TODO: Really, there should be monthFactor.zoo, monthFactor.xts, monthFactor.Date, monthFactor.character, monthFactor.integer, etc.

Value

A factor

Factor with levels Jan, Feb, Mar, ...

See Also

months


pteetor/tutils documentation built on April 25, 2024, 9:14 a.m.