Hello, I have to merge several serie by "date". I used: cb<-merge(cbds,cbbond,by=c("date"),all=T). I have the daily and the high frequency data. Unfortunately, the programm did not sort by "sort" my data in a chronological manner. Is there any possibility to do this in R?. Thanks in advance, Silke
http://www.ats.ucla.edu/stat/r/faq/sort.htm Best, daniel sprohl wrote:> > Hello, > I have to merge several serie by "date". I used: > > cb<-merge(cbds,cbbond,by=c("date"),all=T). > > I have the daily and the high frequency data. > Unfortunately, the programm did not sort by "sort" > my data in a chronological manner. > Is there any possibility to do this in R?. > Thanks in advance, > Silke > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > >-- View this message in context: http://www.nabble.com/specifying-data-tp18378344p18380112.html Sent from the R help mailing list archive at Nabble.com.
r-help-bounces at r-project.org napsal dne 10.07.2008 08:10:36:> Hello, > I have to merge several serie by "date". I used: > > cb<-merge(cbds,cbbond,by=c("date"),all=T). > > I have the daily and the high frequency data. > Unfortunately, the programm did not sort by "sort"Maybe ?sort or ?order can help you. I presume that date is in some date/time format like POSIx. Regards Petr> my data in a chronological manner. > Is there any possibility to do this in R?. > Thanks in advance, > Silke > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html> and provide commented, minimal, self-contained, reproducible code.
have you tried reshape package? library(reshape) dfm <- melt(dataframe, m = "date") You can find out more about reshape at http://had.co.nz/reshape sprohl wrote:> > Hello, > I have to merge several serie by "date". I used: > > cb<-merge(cbds,cbbond,by=c("date"),all=T). > > I have the daily and the high frequency data. > Unfortunately, the programm did not sort by "sort" > my data in a chronological manner. > Is there any possibility to do this in R?. > Thanks in advance, > Silke > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > >-- View this message in context: http://www.nabble.com/specifying-data-tp18378344p18420300.html Sent from the R help mailing list archive at Nabble.com.