aL3xa/rapport — Issue #25: nested rapport calls: increment header level
Author: daroczig
Created: 2012-01-11 10:45:20+00:00
State: open
Labels: feature, template

I've just pushed a live demo of multiple levels of nested `rapport`s in aL3xa/rapport@c675b18.

There I made up a 3-level *templates in templates* structure as follows:

- multivar-descriptive.tpl calls univar-descriptive.tpl
- univar-descriptive.tpl calls nortest.tpl

It runs fine thanks to modifications done in rapport [lately](https://github.com/aL3xa/rapport/commit/4123f358e31865499cb6ac34e39909613b0dd7f4) and [later](https://github.com/aL3xa/rapport/commit/707d576f2dad8306dd0e8a591998ee043423983f#diff-4), but there are something to tweak :)

Just run an example from `multivar-descriptive`, eg.:

```
rapport.html('multivar-descriptive', data=mtcars, vars=c('hp','wt'))
```

Sorry for not using `ius2008` but here I need more then one numeric variable.

The problem in the output is that nested rapport classes retain the header level, which is not the best solution as is screws up the structure of the document IMHO.

Feature request: add an optional parameter to `rapport` to be able to "lag" header levels by given value. Eg. that way we could call `rapport` in templates (as nested template) with added parameter, like:

```

## Title

rapport('template', inputs, header.lag=1)
```

If you are ready with modifying `template.R`, I am open to implement this quite easily, just ping me.