简体   繁体   中英

How to vertical align inside text of tableGrob R

Whenever i am using tableGrob in R, i am unable to vertically align inside text of cell, column & Row, but for horizontally the option is present, core.just = "left"...

Is there anyway to vertically align the text, because it always come in centre.

Directly adapted from the new vignette ,

library(gridExtra)
tt1 <- ttheme_default()
tt2 <- ttheme_default(core=list(fg_params=list(vjust=1, y=0.9)))
tt3 <- ttheme_default(core=list(fg_params=list(vjust=0, y=0.1)))

grid.arrange(
  tableGrob(mtcars[1:4, 1:3], rows=NULL, cols=NULL, theme=tt1),
  tableGrob(mtcars[1:4, 1:3], rows=NULL, cols=NULL, theme=tt2),
  tableGrob(mtcars[1:4, 1:3], rows=NULL, cols=NULL, theme=tt3),
  nrow=1)

在此处输入图片说明

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