Flexdashboard中的反应式数据框

时间:2019-06-11 01:42:22

标签: r flexdashboard

我正在尝试从metafor包中将sharedData()传递给rma()函数。但是我得到了错误:

Warning: Error in eval: object 'yi' not found
  104: eval
  103: eval
  102: rma
  101: renderPrint [<text>#5]
  100: func
   84: origRenderFunc
   83: output$out3d9c511e95ea780b
    3: <Anonymous>
    1: rmarkdown::run

title:“测试” 输出:   flexdashboard :: flex_dashboard:   方向:列 源代码:FALSE 主题:平淡

运行时:闪亮

knitr::opts_chunk$set(echo = FALSE)
library(crosstalk)
library(flexdashboard)
library(shiny)
library(plotly)
library(dplyr)
library(metafor)
sd <- SharedData$new(dat, group="dat_subset")

输入{.sidebar}

# Filter input - Bacterium
filter_select(id = "bacterium", 
              label = "Select Bacterium(s)",
              sharedData = sd,
              group = ~Bacterium)

# Filter input - Food category
filter_select(id = "Food category", 
              label = "Select Food Category",
              sharedData = sd, 
              group = ~FoodClass)

# Filter checkbox - Temperature
filter_checkbox(id = "temperature", 
                label = "Select Storage Temperature",
                sharedData = sd, 
                group = ~Temperature,
                inline = TRUE)

元分析{data-navmenu =“元分析”}

元分析结果

renderPrint({
  sd <- SharedData$new(dat, group="dat_subset")
  meta0 <- rma(yi=yi, vi=vi, data=sd$selection())
  summary(meta0)
})

我希望根据定义的过滤器获得meta0结果。

0 个答案:

没有答案