time series in R
Translations
Englishالعربية
български
català
中文
čeština
dansk
Nederlands
eesti
suomi
français
Deutsch
Ελληνικά
עברית
हिंदी
magyar
Bahasa Indonesia
italiano
日本語
한국어
latviešu
lietuvių
norsk
polski
Português
română
русский
slovenčina
slovenski
español
svenska
ไทย
Türkçe
українська
Tiếng Việt
here is my question:
i have these data
summary(data)
Date
1990/01: 1
1990/02: 1
1990/03: 1
1990/04: 1
1990/05: 1
1990/06: 1
(Other):242
attribute
Min. :164.9
1st Qu.:201.5
Median :244.1
Mean :274.6
3rd Qu.:313.3
Max. :512.1
NA's : 1.0
and i want to draw a time series plot
so i tried this:
qplot(as.Date(Date, "%Y/%m/%d"), attribute, data = data, geom = "line", main="Attribute per month 1990-2010", xlab="month-year", ylab="attribute" , colour = I("steelblue4"),fill = I("steelblue4"))
and i got:
Error in seq.int(r1$year, to$year, by) : 'from' must be finite
In addition: Warning messages:
1: In min(x) : no non-missing arguments to min; returning Inf
2: In max(x) : no non-missing arguments to max; returning -Inf
any ideas to solve it?
thank you
This question and answers originated from www.stackoverflow.com
Question by Eleftheria (10/7/2010 7:10:14 PM)
Answer |
This conversion as.Date(Date, "%Y/%m/%d") gives you NA for all values.
Try as.Date(paste(Date,"01",sep="/"), "%Y/%m/%d").
Answer by Marek
Find More Answers
Related Topics r ggplot2 time-series