简体   繁体   中英

Splitting Rstudio's Viewer pane: possible?

I was wondering if there might be a way to split Rstudio's Viewer pane (like par(mfrow = 2:1) for the Plot pane ) so that I could display 2 flextable objects?

 library('flextable')
 dat1 <- data.frame(Approaches = c("Y", "Y", "N"), Meets = c("N", "Y", "N"), row.names = c("Read", "Math", "Sci."))
 dat2 <- data.frame(Read = "Y", Math = "N")

 flextable(dat1)  # Display this
 flextable(dat2)  # and Display this

That's possible with htmltools package:

library(htmltools)
library(flextable)

dat1 <- data.frame(Approaches = c("Y", "Y", "N"), Meets = c("N", "Y", "N"), row.names = c("Read", "Math", "Sci."))
dat2 <- data.frame(Read = "Y", Math = "N")
browsable(tagList(
  htmltools_value(flextable(dat1)),  # Display this
  tags$hr(),
  htmltools_value(flextable(dat2))  # and Display 
))

在此处输入图片说明

This is a basic example, you can get much more complex layout with css and htmltools.

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