Like markdown / html tables containing plus / minus

I use chain

knitr::knit2html("test.Rmd") # generates test.md & test.html
rmarkdown::render("test.md") # overwrites test.html

to generate an html report.

This chain provides good functionality, since my report usually combines images, tables, and text. If I ran only

knitr::knit2html("test.Rmd")

"test.html" will be generated, but it does not look comfortable, that is, images are not displayed correctly.

This usually works fine, but this time the name patterns that are the table headers contain "+" or "-".

|               | IP_gene8-_1st| IP_gene8+_1st| 
|:--------------|-------------:|-------------:|
|IP_gene8-_1st  |     1.0000000|     0.4357325|
|IP_gene8+_1st  |     0.4357325|     1.0000000|

The "test.html" generated knit2html("test.Rmd")will contain a valid table, but other images are not displayed correctly.

<table><thead>
<tr>
<th align="left"></th>
<th align="right">IP_Rad18-_1st</th>
<th align="right">IP_Rad18_1st</th>
</tr>
</thead><tbody>
<tr>
<td align="left">IP_Rad18_1st</td>
<td align="right">1.0000000</td>
<td align="right">0.4357325</td>
</tr>
<tr>
<td align="left">IP_Rad18_1st</td>
<td align="right">0.4357325</td>
<td align="right">1.0000000</td>
</tr>
</tbody></table>

rmarkdown::render("test.md") "test.html" , , , . crappy table :

| | IP_gene8-_1st | IP_gene8 + _1st | |: ------------- | -------------: | -------------: | | IP_Rad18_1st | 1.0000000 | 0.4357325 | | IP_Rad18_1st | 0.4357325 | 1.0000000 |

"+" "-" "/", .

rmarkdown::render(), html?

+4

All Articles