Rapporter/pander — pull request #107 by RomanTsegelskyi (2014-07-22 14:46:59+00:00)
Title: S3 method for microbenchmark

S3 method for microbenchmark class.
Also supports unit param and user defined expression names.

**Basic examples**

```
> pander(b)

--------------------------------------------------------
expr min lq median uq
----------------------------- ----- ----- -------- -----
pander(data.frame(a = 3.543 4.264 4.822 6.138
"foo\nbar"), keep.line.breaks
= TRUE)

pander(data.frame(a = 3.415 4.018 4.614 5.504
"foo\nbar"))
--------------------------------------------------------

Table: Unit: milliseconds (continued below)

-------------
max neval
----- -------
11.61 100

11.5 100
-------------
```
```
> pander(b, split.tables = Inf)

----------------------------------------------------------------------
expr min lq median uq max neval
----------------------------- ----- ----- -------- ----- ----- -------
pander(data.frame(a = 3.543 4.264 4.822 6.138 11.61 100
"foo\nbar"), keep.line.breaks
= TRUE)

pander(data.frame(a = 3.415 4.018 4.614 5.504 11.5 100
"foo\nbar"))
----------------------------------------------------------------------

Table: Unit: milliseconds
```
Supports user defined expression labels through `expr.labels`
```
> pander(b, split.tables = Inf, expr.labels = c("First", "Second"))

-----------------------------------------------
expr min lq median uq max neval
------ ----- ----- -------- ----- ----- -------
First 3.543 4.264 4.822 6.138 11.61 100

Second 3.415 4.018 4.614 5.504 11.5 100
-----------------------------------------------

Table: Unit: milliseconds
```
Supports different units through `unit` param.
```
> pander(b, split.tables = Inf, expr.labels = c("First", "Second"), unit = "s")
----------------------------------------------------------
expr min lq median uq max neval
------ -------- -------- -------- -------- ------- -------
First 0.003543 0.004264 0.004822 0.006138 0.01161 100

Second 0.003415 0.004018 0.004614 0.005504 0.0115 100
----------------------------------------------------------

Table: Unit: seconds
```