我正在尝试理解如何在闪亮的应用程序中使用R6类对象,并且我希望使用selectInput()选项在R6对象中呈现数据。select input选项包含R6对象的名称。 我有以下对象: library(R6)
Person <- R6Class("Person", list(
name = NULL,
age = NA,
sons = NA,
initialize = function(name, age = NA, sons = NA) {
self$name <- name
self$age <- age
self$
我正在开发一个闪亮的应用程序,我正在使用一个带有100个不同变量的下拉菜单。我只想展示其中的一个子集。我可以缩短data.frame,但出于其他原因,我需要它这么长。有什么想法吗?
谢谢你的帮助。
这是我在server.R上的资料
output$xvar <- renderUI(selectInput('xvar',label='I want to show only certain variables here', choices = names(df),selected = names(df)[1]))
我试图在一个闪亮的仪表板上绘制一个相当简单的图,但是我得到了这个错误: Warnung: Error in unique.default: unique() kann nur auf Vektoren angewendet werden
51: unique.default
49: factor
48: table
47: server [C:/.../Dashboard.R#38]
Error in unique.default(x, nmax = nmax) :
unique() kann nur auf Vektoren angewendet werden 我的
我正在开发一个闪亮的应用程序,我想在其中设置一个S4对象作为全局变量。但是我得到了一个错误消息:
Error in .getReactiveEnvironment()$currentContext() :
Operation not allowed without an active reactive context. (You tried to do something that can only be done from inside a reactive expression or observer.)
我想知道是否S4对象不能在shiny中设置为反应值。
我的代码在这里
ense