拆分 Rstudio 的查看器窗格:可能吗?
Splitting Rstudio's Viewer pane: possible?
我想知道是否可以拆分 Rstudio 的 查看器窗格 (例如 par(mfrow = 2:1)
拆分 绘图窗格 ) 以便我可以显示 2 flextable
个对象?
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
htmltools
包可以做到这一点:
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
))
这是一个基本示例,您可以使用 css 和 htmltools 获得更复杂的布局。
我想知道是否可以拆分 Rstudio 的 查看器窗格 (例如 par(mfrow = 2:1)
拆分 绘图窗格 ) 以便我可以显示 2 flextable
个对象?
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
htmltools
包可以做到这一点:
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
))
这是一个基本示例,您可以使用 css 和 htmltools 获得更复杂的布局。