Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/76.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
R 分块发光板_R_Shiny - Fatal编程技术网

R 分块发光板

R 分块发光板,r,shiny,R,Shiny,我目前正在玩shinyTable,这是一个兼容HandsonTable()的闪亮的实现。巧合的是,我意识到,如果我在呈现的data.frame中添加logical列,那么这些值将显示为可单击的复选框。我的希望是使用它来轻松地对表进行子集划分: library(devtools) # those versions are necessary to let shinyTable work with shiny install_github( "shiny", "rstudio", ref="fcf9

我目前正在玩
shinyTable
,这是一个兼容HandsonTable()的
闪亮的
实现。巧合的是,我意识到,如果我在呈现的
data.frame
中添加
logical
列,那么这些值将显示为可单击的复选框。我的希望是使用它来轻松地对表进行子集划分:

library(devtools)
# those versions are necessary to let shinyTable work with shiny
install_github( "shiny", "rstudio", ref="fcf963639e4839e5689665c257e7f488c9c34cc0" )
install_github( "shinyTable", "JackStat" )
library(shiny)
library(shinyTable)

runApp(list(
  ui = bootstrapPage( 
    htable( "tbl", clickId="tblClick", headers="provided")
  ),
  server = function(input, output) {
    output$tbl <- renderHtable({
      if( is.null( input$tbl ) ){
        return( data.frame( select = TRUE, value = 1:10  ) )
      } else{
        return( input$tbl[ input$tbl$select, ] )
      }
    })
  }
))

库(devtools)
#这些版本对于让shinyTable与shinyTable一起工作是必需的
安装github(“闪亮”、“rstudio”,ref=“fcf963639e4839e568965c257e7f488c9c34cc0”)
安装github(“shinyTable”、“JackStat”)
图书馆(闪亮)
图书馆(shinyTable)
runApp(列表(
ui=引导(
htable(“tbl”,clickId=“tblClick”,headers=“提供”)
),
服务器=功能(输入、输出){

在这种情况下,输出$tbl越少越好

library(shiny)
library(shinyTable)

runApp(list(
  ui = bootstrapPage( 
    htable( "tbl", clickId="tblClick", headers="provided", readOnly = 'false')
  ),
  server = function(input, output) {
    output$tbl <- renderHtable({
      if( is.null( input$tbl ) ){
        return( data.frame( select = TRUE, value = 1:10  ) )
      }
    })

  }

))
库(闪亮)
图书馆(shinyTable)
runApp(列表(
ui=引导(
htable(“tbl”,clickId=“tblClick”,headers=“提供”,readOnly=“false”)
),
服务器=功能(输入、输出){

output$tbl我使用了
selectInput(…,multiple=TRUE)
来进行这种子集设置,到目前为止对我来说似乎更整洁,这确实避免了这种奇怪的行为。但是我现在如何进行子集设置呢?它甚至不必是被动的。但至少必须有类似于操作按钮的东西,可以从视图中删除未选择的行。