简体   繁体   中英

Multi-row cells in Rmarkdown table?

I'd like to add a table to an Rmarkdown document that contains a configuration like this:

Microsoft Office的多行单元

But none of the four standard methods of creating tables in Rmarkdown in html mode seem to support cells that span multiple rows or columns. Is there some workaround I can use to include multirow cells like this in my tables?

Note that this is different than Multiple lines in a single cell for rmarkdown table , as I'm not looking to put multiple lines in a cell, I'm looking to make a cell that spans multiple rows.

If Rmarkdown is like markdown, you can (and I think is the only way to do it) insert the table creation code directly in HTML, something like:

<table>
  <TR>
       <TD ROWSPAN="4">Type</TD>
       <TD COLSPAN="1">data-1</TD>
     </TR>
     <TR>
          <TD>data-2</TD>
     </TR>
     <TR>
          <TD>data-3</TD>
     </TR>
     <TR>
          <TD>data-4</TD>
     </TR>
</table>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM