Gallery service

To showcase analysis results, you simply have to put an image into your public/gallery/ folder. Allowed file types are ".png", ".jpg", and ".pdf".

Creating images
To create a simple gallery example, try the following lines of code:

a = c(1,2,3,4,10,11,12) png ( file="public/gallery/results.png") plot (a) dev.off

PDF reports using Sweave
There are other interesting packages for report generation: Sweave and RMarkDown. This here is an example that creates a demo output report as PDF using LaTeX:

testfile = system.file("Sweave", "Sweave-test-1.Rnw", package = "utils") options(device.ask.default=FALSE) Sweave(testfile)

This will create a tex (Sweave-test-1.tex) file, which you then can compile into a PDF using the following:

tools::texi2pdf("Sweave-test-1.tex")

Click here for a very simple LaTeX report template, that you can download, put into your public/gallery/ folder, and then compile with

setwd("~/public/gallery") tools::texi2pdf("report-demo.tex")

Gallery indexing
Your public/gallery/ folder is not indexed immediately, but within the next hour. On the hour (and with a few minutes delay), the resulting picture should show up in the gallery rotation on crunch's start page.

''The gallery folders are indexed on an hourly basis (on the full hour) by a cron job. ''

If you are an admin, you can force re-indexing by clicking this (password protected) link.

NOTE (PDFs): The first page of any PDF file (any file with file ending ".pdf") will be converted with ImageMagick to a 190x190 pixel preview. This preview is stored in a temp folder and is recreated with each cron run of the indexing service. This preview is used in the gallery rotation on the crunch start page.