To extract month and year from a yearmon object, you can use the format function from the base package as follows:
library("zoo")
myDate <- as.yearmon("Apr 2005", "%b %Y")
> format(myDate, "%b")
[1] "Apr" #Month as character
> format(myDate, "%Y")
[1] "2005" #Year as character
> format(myDate, "%m")
[1] "04" #numeric month as character
> format(myDate, "%B")
[1] "April" #Full month name as character
To convert the output to a numeric type:
>as.numeric(format(myDate, "%m"))
[1] 4
> as.numeric(format(myDate, "%Y"))
[1] 2005
: