yihui/knitr — pull request #915 by juba (2014-12-15 14:08:48+00:00)
Title: Fix na colname

Hi,

In the current `knitr` version, applying `kable` to a table or matrix with missing colname generates an error :

```r
> m <- matrix(c(1, 1, 1, 1), ncol = 2, dimnames = list(c('A', NA), c('B', NA)))
> m
B
A 1 1
1 1
> kable(m)
Erreur dans rep.int(string[i], times[i]) : valeur 'times' incorrecte
```

This pull request fixes this error by replacing any missing column name with the `"NA"` character string. Then `kable(m)` gives :

```r
> kable(m)

| | B| NA|
|:--|--:|--:|
|A | 1| 1|
|NA | 1| 1|
```