Skip to content
Prev 274711 / 398502 Next

Beginner's question about plotting variables in a time series object with the date on the x axis

On Oct 17, 2011, at 5:23 PM, Iara Faria wrote:

            
I agree with Weyland. Figuring out how to use class `ts` objects in R  
is difficult. If it were easy I don't think Zeileis would have  
invented `zoo`.
(See below for what that did.)
Try:

plot(time(dados2), dados[, "divliq.pib"] , xy.labels=FALSE))
Read the help page again(?). "A data frame will be coerced to a  
numeric matrix via data.matrix."

The names function only works for lists and name vectors. Try colnames()
David Winsemius, MD
West Hartford, CT