month2num: Transform month names to month numbers

Description Usage Arguments Value Examples

View source: R/month2num.R

Description

month2num transform month names to month numbers

Usage

1

Arguments

date

a month names vector

Value

Return a month numbers.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
v=c("jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez")
month2num(v)

v=data.frame('date'=c("janeiro","fevereiro",'março','abril'),'values'=c(18,27,10,48))
month2num(v$date)
#or
month2num(v[[1]])

#you can substitute column with function:
v$date = month2num(v$date)
v[[1]] = month2num(v[[1]])

jvg0mes/metools documentation built on June 28, 2020, 2:38 a.m.