P粉7864325792023-09-04 14:21:52
I guess there are multiple ways to do this. One option is to use Bootstrap Columns implemented in the crosstalk
package:
library(r2d3) library(crosstalk) crosstalk::bscols( widths = c(6, 6), r2d3(data=c(0.3, 0.6, 0.8, 0.95, 0.40, 0.20), script = "barchart.js", width = 300, height = 200), r2d3(data=c(0.3, 0.6, 0.8, 0.95, 0.40, 0.20), script = "barchart.js", width = 300, height = 200) )
BTW - bscols is also very useful for scheduling any interactive html widget, and can solve most cases where "normal" Rmd output cannot be easily scheduled.