Skip to content
Back to formatted view

Raw Message

Message-ID: <1357322311.22211.YahooMailNeo@web142602.mail.bf1.yahoo.com>
Date: 2013-01-04T17:58:31Z
From: arun
Subject: Can you help me please
In-Reply-To: <BAY173-W480F85514843D53B15B466A7200@phx.gbl>

HI Fares,

You could try this:
dat1<- read.table(text="
date????? donation
3jan2003?? 20235
4jan2003?? 25655
5jan2003?? 225860
6jan2003?? 289658
7jan2003?? 243889
8jan2003?? 244338
9jan2003?? 243889
",sep="",header=TRUE,stringsAsFactors=FALSE) 


The post is not very specific as to what you need.? I hope this works for you.


library(xts)
dat2<-xts(dat1[,2],order.by=as.Date(dat1[,1],format="%d%b%Y"))
?dat2
#???????????? [,1]
#2003-01-03? 20235
#2003-01-04? 25655
#2003-01-05 225860
#2003-01-06 289658
#2003-01-07 243889
#2003-01-08 244338
#2003-01-09 243889

str(dat2)
#An ?xts? object from 2003-01-03 to 2003-01-09 containing:
#? Data: int [1:7, 1] 20235 25655 225860 289658 243889 244338 243889
#? Indexed by objects of class: [Date] TZ: 
#? xts Attributes:? 
#List of 2
# $ tclass: chr "Date"
?#$ tzone : chr ""
plot(dat2)

A.K.
________________________________
From: Fares Said <frespider at hotmail.com>
To: arun <smartpink111 at yahoo.com> 
Sent: Friday, January 4, 2013 9:16 AM
Subject: Can you help me please



Hi A.K,

I am not sure if you have looked at this question,

If not can you please look

http://r.789695.n4.nabble.com/Generate-time-series-data-td4654589.html

Thanks