简体   繁体   中英

Increasing the height of table rows in R

Please check the R code and snapshot below, I want to increase the height of the rows in the table.

library(DT)
datatable(head(iris), rownames = FALSE)

In order to achive this in css, you make use of:

#example tr td {
height: 894px;
}

快照的描述

You can use formatStyle() to change the row height:

library(DT)

datatable(head(iris), rownames = FALSE) %>%
  formatStyle(names(iris), # select all columns in table
              height = 894) # set height of rows

The output looks like this (first 2 rows only):

输出

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