Hi all, please see my code:

 

> library(zoo)

> a <- as.yearmon("March-2010", "%B-%Y")

> b <- as.yearmon("May-2010", "%B-%Y")

> 

> nn <- (b-a)*12   # number of months in between them

> nn

[1] 2

> as.integer(nn)

[1] 1

 

What is the correct way to find the number of months between "a" and "b",
still retaining the INTEGER property?

 

Thanks for your time.


	[[alternative HTML version deleted]]

