time series in R


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 (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

Find More Answers
Related Topics  r  ggplot2  time-series
Related Questions
  • Time Series in R with ggplot2

    I'm a ggplot2 newbie and have a rather simple question regarding time-series plots. I have a data set in which the data is structured as follows. Area 1998 1999 2000 2001 2002 2003 2004 200…
  • R ggplot2 plot several time series in a plot

    After succeeding (with your help) in plotting meteo variables in single (one variable) graphs I'm trying to produce a panel with time series of the different variables in my data in a single panel, …
  • Time series in R

    I am tracking my body weight in a spread sheet but I want to improve the experience by using R. I was trying to find some information about time series analysis in R but I was not succesful. The …
  • time series barplot in R

    i have a time series data like this: x <- structure(list(date = structure(c(1264572000, 1266202800, 1277362800, 1277456400, 1277859600, 1278032400, 1260370800, 1260892800, 1262624400, 126270…
  • plotting time series in R

    I am working with data, 1st two columns are dates, 3rd column is symbol, and 4th and 5th columns are prices. So, I created a subset of the data as follows: test.sub<-subset(test,V3=="GOOG",sel…
  • Monthly Time series in R

    I have a data frame of 2M unix timestamps and I want to make a monthly histogram of that. Any suggestions? thanks
  • R: Plot a time series with quantiles using ggplot2

    I need to plot a time series with ggplot2. For each point of the time series I also have some quantiles, say 0.05, 0.25, 0.75, 0.95, i.e. I have five data for each point. For example: time q…
  • Multivariate time series modelling in R

    I want do fit some sort of multi-variate time series model using R. Here is a sample of my data: u cci bci cpi gdp dum1 dum2 dum3 dx 16.50 14.00 53.00 45.70 80.63 0 0 1 6.…
  • recoding time series data in r

    I am trying to recoding a existing data with a overtime structure. My dataset looks like this: dput(z) structure(list(democracy = c(0L, 0L, 0L, 0L, 0L, 0L, 1L, 1L, 1L, 0L, 0L, 0L, 0L, 0L, 0L, 0…
  • Storing complex time-series in R

    I have a dataframe with several columns: state county year Then x, y, and z, where x, y, and z are observations unique to the triplet listed above. I am looking for a sane way to store…