五月天婷亚洲天久久综合网,婷婷丁香五月激情亚洲综合,久久男人精品女人,麻豆91在线播放

  • <center id="8gusu"></center><rt id="8gusu"></rt>
    <menu id="8gusu"><small id="8gusu"></small></menu>
  • <dd id="8gusu"><s id="8gusu"></s></dd>
    樓主: suzhzh
    661 1

    [問答] How to display the simulated data X in the main panel? [推廣有獎(jiǎng)]

    • 29關(guān)注
    • 39粉絲

    學(xué)科帶頭人

    54%

    還不是VIP/貴賓

    -

    威望
    0 級(jí)
    論壇幣
    14484 個(gè)
    通用積分
    757.4390
    學(xué)術(shù)水平
    70 點(diǎn)
    熱心指數(shù)
    87 點(diǎn)
    信用等級(jí)
    52 點(diǎn)
    經(jīng)驗(yàn)
    30444 點(diǎn)
    帖子
    3232
    精華
    0
    在線時(shí)間
    1285 小時(shí)
    注冊(cè)時(shí)間
    2009-9-18
    最后登錄
    2024-10-20

    樓主
    suzhzh 發(fā)表于 2019-12-26 15:03:00 |只看作者 |壇友微信交流群|倒序 |AI寫論文
    相似文件 換一批

    +2 論壇幣
    k人 參與回答

    經(jīng)管之家送您一份

    應(yīng)屆畢業(yè)生專屬福利!

    求職就業(yè)群
    趙安豆老師微信:zhaoandou666

    經(jīng)管之家聯(lián)合CDA

    送您一個(gè)全額獎(jiǎng)學(xué)金名額~ !

    感謝您參與論壇問題回答

    經(jīng)管之家送您兩個(gè)論壇幣!

    +2 論壇幣
    如題, 如何才能在shiny main panel上看到我simulated 數(shù)據(jù)x?

    代碼如下:
    ui <- fluidPage(
      titlePanel("Lesson 1 Introduction to Sample Size Calcuation in Clinical Trials"),
      sidebarLayout(
        sidebarPanel(
        #Select the sample size;
        selectInput(inputId="size", label="Sample size you choose", choices=seq(1, 30, by=1), selected=5),
        numericInput("seed","Seed Number to generate Sample is", 12345, min=0, max=20000),
        numericInput("simn", "Number of Trials", 2, min=1, max=1000)
        ),


        mainPanel(
          h1("Why should we consider Sample Size in Clinical Trials?"),
          h3("Because insufficient size will make an effective drug fail to show efficacy", style = "font-family: 'times'; font-si16pt"),
          br(),
          br(),
          strong("An example"),
          br(),  
          em("Suppose a new tech which improves the quality, which is measured by use of the quality in kg, of the product.
          The previous standard is mean of 3kg, while now the tech patent owner claims to the quality could reach to 5kg and the standard deviation is 3.
          Therefore, we would like to testify this statement by use of a trial"),
          br(),
          code("it could be easily calculate out to reach a 80% power, we need to sample 16, so if we sample 10, 12, 14, let's see what the power is" ),
          div("This could be shown in the example", style = "color:blue"),
          br(),
          p("span does the same thing as div, but it works with",
            span("groups of words", style = "color:blue"),
            "that appear inside a paragraph."),

          #Output the results you want with font of BOLD;
          strong(textOutput("size")),

          #output the number of trials;
          strong(textOutput('n_trial')),

          #The seed used to generate the data is;
          strong(textOutput('seed')),
          #Output the sample simulated data;
          DT::dataTableOutput("dat")
        )
      )
    )

    server<-function(input, output){
            if(!require(DT)) install.packages("DT")
            library(DT)

    output$size <- renderText({
        paste("You have selected sample size is", input$size)
      })

      output$n_trial<-renderText({
              paste("You have done", input$simn, "trials")
      })


      output$seed<-renderText({
              paste("The seed used to generate the data is", is.numeric(input$seed))
      })
                
      output$dat<-DT::renderDataTable(DT::datatable({
        x<-matrix(0, nrow=input$simn, ncol=input$size)
              for(i in 1:input$simn){
                      x[i,]<-rnorm(input$size,0,1)
              }   
        x
      }))
             
    }

    shinyApp(ui=ui, server=server)
    Q&A.zip (1.25 KB) 本附件包括:
    • Q&A.R
    二維碼

    掃碼加我 拉你入群

    請(qǐng)注明:姓名-公司-職位

    以便審核進(jìn)群資格,未注明則拒絕

    關(guān)鍵詞:Simulated simulate Display Panel disp

    沙發(fā)
    suzhzh 發(fā)表于 2019-12-31 12:13:53 |只看作者 |壇友微信交流群
    沒有人能幫忙看看嗎?謝謝

    本版微信群
    加好友,備注cda
    拉您進(jìn)交流群

    京ICP備16021002-2號(hào) 京B2-20170662號(hào) 京公網(wǎng)安備 11010802022788號(hào) 論壇法律顧問:王進(jìn)律師 知識(shí)產(chǎn)權(quán)保護(hù)聲明   免責(zé)及隱私聲明

    GMT+8, 2024-12-23 03:25