r - frequency() and cycle() of a monthly xts object returns value "1" -
i have monthly xts object, , function frequency()
returns value of 1, expect 12. function cycle()
not return month numbers, instead value of 1 each observation.
library('quantmod') getsymbols("gs10", src="fred") frequency(gs10) cycle(gs10)
try this:
time(gs10) <- as.yearmon(time(gs10))
Comments
Post a Comment