Re: [R] ggplot2

2013-07-08 Thread AlexPiche
if anyone was interested ggplot(xmelt, aes(x=factor(Var1),value, row=L1, col=Var2, group=Var2, fill=factor(Var1))) + geom_bar(stat="identity")+ facet_grid(Var2~L1, scale="free") + xlab("Maturities") + ylab("Basis Points Move") + theme(legend.position = "none") + scale_fill_grey(start=0.8,end=0.3

[R] ggplot2

2013-07-08 Thread AlexPiche
Hello Folks, I have an other problem with ggplot2. This is what I got so far. levels(xmelt$Var2) <- c("Outright", "Market Move Adjusted") ggplot(xmelt, aes(x=factor(Var1),value, row=L1, col=Var2, group=Var2)) + geom_bar(stat="identity") + facet_grid(Var2~L1, scale="free") + xlab("Maturities")

Re: [R] ggplot2

2013-07-05 Thread AlexPiche
Thank you Mr. Kane for your time, I finally achieve my objective with the package reshape2 n5dt<-last(dezdiff,5) n5dt <- as.data.frame(t(n5dt)) n5dt$id <- c(1:35) subm5dt<-melt(n5dt, id="id", c("2013-06-28", "2013-07-01", "2013-07-02", "2013-07-03", "2013-07-04") ) names(subm5dt) <- c("Observat

Re: [R] ggplot2

2013-07-04 Thread AlexPiche
Here last function (x, ...) { UseMethod("last") } I can share 100 rows if you want, but I don`t you will find it useful, since I want to perform my time-series on a single row. Here`s one: dezdiff.dt[nrow(dezdiff.dt),] datetime X1X2X3 X4X5

[R] ggplot2

2013-07-04 Thread AlexPiche
Hello Folks, I have a database of 2000+ days with 35 observations each. I am trying to modeling a time series by day, but it seems a problem that I don str(last(dezdiff)) An ‘xts’ object on 2013-07-04/2013-07-04 containing: Data: num [1, 1:35] 1.9016 0.7545 0.225 0.0727 0.1357 ... - attr(*, "di

[R] Produce HTML reference in knitr using rmd

2013-06-20 Thread AlexPiche
Hello guys, I'm new to knitr and to R in general. I'm using RStudio and knitr, both the latest version. I am trying to produce an html page with multiple graph, which has a url reference to each of them that bring us lower on the page. For those produce separately it is pretty easy, since I just

Re: [R] knitr without R studio

2013-06-20 Thread AlexPiche
Thank you for your time guys, I solve my issue. Regards, Alex -- View this message in context: http://r.789695.n4.nabble.com/knitr-without-R-studio-tp4669841p4669951.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.o

[R] knitr without R studio

2013-06-19 Thread AlexPiche
Hello folks, I`m using knitr on R studio, which make it easy to use, but a coworker of mine would like to run it on "simple" R. So I was wondering if you know what is the equivalent of the button "knit HTML" in RStudio in R. I tried knit2HTML( Graph 1 <#location1> Graph

Re: [R] Data frame to Matrix by category

2013-06-17 Thread AlexPiche
Thank you mate! -- View this message in context: http://r.789695.n4.nabble.com/Data-frame-to-Matrix-by-category-tp4669669p4669768.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/

[R] Data frame to Matrix by category

2013-06-16 Thread AlexPiche
Hello Folks, I try to use plyr and reshape 2 to take a data frame of the form: > head(cf_dt) isin dt 1 FR0109970386 2010-01-12 2 FR0109970386 2011-01-12 3 FR0109970386 2012-01-12 4 FR0116114978 2010-01-12 5 FR0116114978 2011-01-12 6 FR0116114978 2012-01-12 to create a matrix o