Hi Abhi,

I'm glad that you've gotten RpeortingTools working. Perhaps Josh can
discuss a bit how to customize the alignment and spacing of the tables that
are produced. I'm much less familiar with the CSS options that exist.

For your second question, we can look to the examples in the microarray
analysis vignette for some hints about how to do this. In the "Differential
expression analysis using limma" section, there's a function for producing
one plot per row in the table. We can extend this example like this:

> library(hwriter)
> makeNewImages <- function(df,...){
+         imagenames1 <- paste0(df$ProbeId, "_1")
+         imagenames2 <- paste0(df$ProbeId, "_2")
+         imagenames3 <- paste0(df$ProbeId, "_3")
+         for (i in 1:nrow(df)){
+                 probeId <- df$ProbeId[i]
+                 pl1 <- xyplot(...)
+                 pl2 <- xyplot(...)
+                 pl3 <- xyplot(...)
+                 png(filename = paste0("./reports/figuresde_analysis/",
+                       imagenames1[i]))
+                 print(pl1)
+                 dev.off()
+                 png(filename = paste0("./reports/figuresde_analysis/",
+                       imagenames2[i]))
+                 print(pl2)
+                 dev.off()
+                 png(filename = paste0("./reports/figuresde_analysis/",
+                       imagenames3[i]))
+                 print(pl3)
+                 dev.off()
+
+         }
+         image.link1 <- hwriteImage(paste0("figuresde_analysis/",
imagenames1),
+                                 table=FALSE, width=100)
+         image.link2 <- hwriteImage(paste0("figuresde_analysis/",
imagenames1),
+                                 table=FALSE, width=100)
+         image.link3 <- hwriteImage(paste0("figuresde_analysis/",
imagenames1),
+                                 table=FALSE, width=100)
+         df <- data.frame(df, Image1 = image.link1, Image2 = image.link2,
Image3 = image.link3)
+         return(df)
+ }

> publish(my.df, my.report, .modifyDF = makeNewImages)
> finish(my.report)

This will work easiest with lattice- or ggplot2-based graphics, because you
can follow the pattern above. Otherwise, you can use recordPlot to capture
the images as in the vignette. The above example also makes the three
images in one function, but you could have three functions and pass a list
of the three functions to .modifyDF, and achieve the same result.

Let me know if you need any help with getting this to work.

Cheers,

Jason



On Mon, Jun 17, 2013 at 3:45 PM, Abhishek Pratap <apratap@lbl.gov> wrote:

> Hi Guys
>
> Now that I am able to create basic reports which already are a great
> time saver. I am wondering do I have some flexibility to decide where
> to render images and some page formatting options.
>
> For example I have three specific requirements at this point.
>
> 1. Left align the whole page. Currently a rendered table is centered
> cutting the displayed text as it is horizontally broad
>
> 2. put multiple images in a single row; in other words put 2-3 images
> side by side in a row.
>
>
> Thanks!
> -Abhi
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor@r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives:
> http://news.gmane.org/gmane.science.biology.informatics.conductor
>



-- 
Jason A. Hackney, Ph.D.
Bioinformatics and Computational Biology
Genentech
hackney.jason@gene.com
650-467-5084

	[[alternative HTML version deleted]]

