Reproducible documents provide an efficient way to produce reports by automatically generating content from code chunks within the report. The processing of a source document, that contains code chunks, to a final document, that contains automatically-generated content, is typically one way, with the resulting report being read-only. This report describes an experiment that attempts to make the final report document modifiable and attempts to invert the process from final document back to source document so that the modifications to the final document can be efficiently conveyed back to the original author of the report.
Eric Lim, Paul Murrell, and Finlay Thompson
The gridGraphviz package renders node-and-edge graphs in R using the grid graphics package. Graphs are laid out using the Rgraphviz package to interface with the graph layout algorithms in graphviz. This article details the improvements made between gridGraphviz versions 0.2 and 0.3, including: support for “ellipse”- and “polygon”-shaped nodes; handling of edges in undirected graphs; support for various new arrow types; and support for edge labels. Version 0.3 also introduces a method to produce graphs with an overall size closer to graphviz’s output.
Ashley Noel Hinton and Paul Murrell
TableToLongForm automatically converts hierarchical Tables
intended for a human reader into a simple LongForm Dataframe that is
machine readable, hence enabling much greater utilisation of the data.
It does this by recognising positional cues present in the hierarchical
Table (which would normally be interpreted visually by the human brain)
to decompose, then reconstruct the data into a LongForm Dataframe. The
article motivates the benefit of such a conversion with an example
Table, followed by a short user manual, which includes a comparison
between the simple one argument call to TableToLongForm, with code for
an equivalent manual conversion. The article then explores the types of
Tables the package can convert by providing a gallery of all recognised
patterns. It finishes with a discussion of available diagnostic methods
and future work.
The grImport2 package imports vector images that are stored in the SVG image format for inclusion within images generated by R. The original grImport package performs the same task, but instead using PostScript images as its source image format. This technical report describes the steps taken to improve not only the grImport package, but also follows the development of two new packages, grImport2 and grConvert. The latter, grConvert, converts images from popular vector image formats (PostScript, PDF and SVG) into valid input formats for grImport and grImport2. The grImport2 package is an entirely new package that does not suffer from some limitations of the grImport package, whose limitations are primarily due to the dependence on the PostScript image format.
Simon Potter and Paul Murrell
SVG is a vector graphic image format that can be used with
browsers to deploy dynamic, interactive graphics over the web. We
present a method that enables generalised Selection and Navigation of
Overlapping SVG Objects by toggling pointer-events CSS styles and the
use of the mousewheel, adding another tool developers can use to grant
users greater and more intuitive interaction with SVG images. We also
present several live examples that demonstrate the method in practice,
both on script generated SVG images and an externally generated SVG image
The gridSVG package has recently provided an interface for
some more advanced SVG graphics features: gradient fills and pattern
fills, clipping paths, masks, and filters. This report describes a
simple test case for some of these advanced graphics features and then
explores some ideas for making use of these features in Statistical
Paul Murrell and Simon Potter
In interventions it may be important to determine whether the benefits extend beyond the active treatment period. This is clearly of interest for intensive lifestyle interventions, and there are also examples in the pharmaceutical literature. We consider estimation of carryover effects on time-to-event outcomes such as incident hypertension or incident diabetes. These are defined by a noisy measurement exceeding a diagnostic threshold, and diagnosis is followed by interventions that make subsequent measurements useless for treatment comparison.
We present the results of a systematic simulation study to determine the ability of a parallel-group trial design to detect carryover. None of the designs we examined had acceptable Type I error rate; most also had low power. When a treatment is effective during the intervention period, reliable testing for a carryover effect is difficult. Parallel-group designs do not appear to be a feasible approach.
Sarah Gwynn Sturdevant and Thomas Lumley
This Literature Review provides an Overview of Open Data in New Zealand by first defi ning Open Data, including key desirable properties and terminology relevant to the discussion, followed by an Overview of New Zealand State Sector sources. The State Sector organisations covered are those listed as Public Service departments on the State Services Commission’s website (http://www.ssc.govt.nz/state_sector_organisations).
This article discusses the importance of providing structure and labelling within SVG code, particularly when the SVG code is generated indirectly by a high-level system and when the SVG code describes a complex image such as a statistical plot. We argue that this is a desirable goal, but that many high-level systems that generate SVG do not provide sufficient structure and labelling. An example of a system, based on R, that does provide structure and labelling, is described to demonstrate that the goal is acheivable and we highlight the crucial features of this system that we see as important factors in achieving this goal.
Paul Murrell and Simon Potter.
The gridSVG package exports grid images to the SVG image format for viewing on the web. This article describes the problems associated with retaining grid object names in SVG element id attributes. In addition, new features in gridSVG that allow manipulation and retrieval of generated id attributes are discussed. These new features allow for easier and more predictable development of interactivity in plots generated by gridSVG.
Simon Potter and Paul Murrell