embed R view without showing console?

LabKey Support Forum (Inactive)
embed R view without showing console? Ben Bimber  2010-03-17 07:51
Status: Closed
 
you can embed an R view using something like:

        var queryConfig = {
            partName: 'Report',
            renderTo: target,
            partConfig: {
                title: rowData.get("ReportTitle") + ": " + subject,
                schemaName: rowData.get("Schema"),
                reportId : rowData.get("Report"),
                'query.queryName': rowData.get("QueryName"),
                'query.Id~in': subject,
                '_select.Id~in': subject
                //showSection: 'histogram'
            },
        new LABKEY.WebPart(queryConfig).render();

Can the config.showSection param be used to do this? How do I figure out what the names of the sections of my report are? Do they match exactly that text in the headers that appear above each section? do i somehow define this in my R script?

thanks.
 
 
Karl Lum responded:  2010-03-17 10:19
The showSection param is the identifier in your R script that you used to define your replacement param.

For example, in the following script fragment, you would use 'labkey_png' as the value for your showSection param to only show the image in your webpart:

png(filename="${imgout:labkey_png}")
        plot(c(rep(25,100), 26:75), c(1:100, rep(1, 50)), ylab= "L", xlab="LabKey",
           xlim= c(0, 100), ylim=c(0, 100), main="LabKey in R")
        dev.off()