$ 运算符对闪亮的 R 中的原子向量无效

乌杰瓦尔特亚吉

在 psych 包中有一个名为 'alpha' 的函数,它给出了各种统计数据。我想要输出中的特定列,因此我使用代码。此代码在控制台中完美运行,但当我尝试在闪亮中使用它时它不起作用。

library(shiny)
library(mirt)#This contains a dataset called deAyala
library(psych)#This has the alpha() function

server<- shinyServer(
    
    function(input, output) {
        
        output$data <- renderUI({
            
            alpha(deAyala,warnings=FALSE)$item.stats$raw.r #Warning disables the warnings 
            
            
            
        })
        
        
    }
)


ui<- shinyUI(fluidPage(
    titlePanel(title = h4("Output", align="center")),
    sidebarLayout(
        sidebarPanel(
        ),
        
        mainPanel(
            uiOutput("data"),
            
        )
        
    )
    
))


shinyApp(ui = ui, server = server)
罗纳克·沙阿

您可以使用renderTablerenderText来显示输出而不是renderUI

library(shiny)

server<- shinyServer(
  function(input, output) {
    output$data <- renderTable({
      alpha(deAyala,warnings=FALSE)$item.stats$raw.r
    })
  }
)

ui<- shinyUI(fluidPage(
  titlePanel(title = h4("Output", align="center")),
  sidebarLayout(
    sidebarPanel(
    ),
    mainPanel(
      tableOutput("data"),
    )
  )
))

shinyApp(ui = ui, server = server)

在此处输入图片说明

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

错误:$ 运算符对原子向量无效(r 闪亮 ggplot)

SQL Server中的R:$运算符对原子向量无效

R fromJSON - $ 运算符对原子向量无效

错误$运算符对制作直方图R的原子向量无效

Speeglm $运算符对原子向量无效

conditionalPanel闪亮的javascript条件:javascript中是否存在R%in%运算符?

闪亮:updateSelectizeInput引发错误“ $运算符对于原子向量无效”

插入符:: train函数中的“错误:$运算符对于原子向量无效”

x $ j中的错误:$运算符对文本聚类中的原子向量无效

plot.lm错误:$运算符对原子向量无效

rfe() 函数错误:$ 运算符对原子向量无效

model.matrix错误:$运算符对原子向量无效

运算符对于函数内部的原子向量无效

方差分析:错误:$运算符对原子向量无效

biglm - 错误:$ 运算符对原子向量无效

第一个函数中的错误:$运算符对原子向量无效

HR.Rates $ y中的错误:$运算符对原子向量无效

R中%in%运算符的C ++版本

R 中的 %<-% 运算符是什么?

R中的双向赋值运算符

R中的tilde(〜)运算符

R中的赋值运算符:“ <-”和“ <<-”

R 参数中的运算符

尽管未使用原子向量或 $,但错误“$ 运算符对原子向量无效”

在R中,如何确定用户定义的中缀运算符的运算符优先级?

R-关系运算符和向量化

在R中将向量运算符永久设置为FALSE

R%*%运算符

随机森林模型的Rcaret提取预测:错误:$运算符对于原子向量无效