小编Chl*_*loe的帖子

R和Shiny:将来自滑块的输入传递给无功功能以计算输出

我有6个参数,用户可以更改值.这是我们的6个输入.我想创建一个输出值,它接受这6个输入,并在函数中给出许多相关方程式来计算我们感兴趣的值.这是我在UI中的内容......

library(shiny)

# Define UI for slider demo application
shinyUI(pageWithSidebar(

#  Application title
headerPanel("# Header Title Goes Here"),

# Sidebar with sliders that demonstrate various available options
sidebarPanel(
# Simple integer interval
sliderInput("u1", "Name:", 
            min=0, max=10000, value=10000),
#There are 6 slider inputs...

    ),

# Show a table summarizing the values entered
mainPanel(
 tableOutput("values"),

 uiOutput("focal"))
 )
)  
Run Code Online (Sandbox Code Playgroud)

这是我在服务器中的内容.R ...

library(shiny)

shinyServer(function(input, output) {

# Reactive expression to compose a data frame containing all of the values
sliderValues <- reactive({

# Compose …
Run Code Online (Sandbox Code Playgroud)

r function output shiny

8
推荐指数
1
解决办法
1万
查看次数

标签 统计

function ×1

output ×1

r ×1

shiny ×1