possible cross tab bugs

LabKey Support Forum (Inactive)
possible cross tab bugs Ben Bimber  2010-06-24 20:43
Status: Closed
 
hi peter,

i'm not quite sure at what level of detail you're asking, so here's a little more info from several levels:

from the end user perspective: The labkey R interface currently allows you to toggle between the source data and the R view. This is quite powerful. We'd want some mechanism for your R script to output data in a filterable/sortable grid. In most cases this data would be an aggregate view along the lines of a crosstab. The user can toggle to the source data tab, add filters, then reload the R view - this interactive part is pretty important. A one-time redirect from R to a separate javascript page that displays the report does not quite capture this same interaction.

Exactly how that works in R probably depends on what's easiest. Currently labkey R reports support multiple sections (pdf, html, console). At least from the perspective of how the interaction with R reports works right now, allowing a 'grid' section of an R report might be useful. Within R you might build your dataframe, then pass it to some function that handles creation of the grid. I guess if the R report exports HTML, then you might just need some function that accepts a dataframe and creates the javscript/HTML output.

My R knowledge isnt all that deep, so I'm probably not the best to ask on how this might actually get implemented in R. I'd be very keen in learning what it might take and trying to help with developing something.


For what it's worth, a slightly unrelated extension would be to make the whole R report a little more ajax-y. If each tab stopped triggering a reload, it would be easier to embed an R report in a page. It would also be useful if there were a better mechanism to view the source data side-by-side with the R report. For example, you might have the source data and a bar graph (or a filterable grid). As you filter your source data, you want to see how the graph changes and possibly keep trying new permutations. This is easier if you dont need to navigate and reload every time you switch between the two tabs. That's another project though.