How to make dynamically generated shiny UI elements 'flow'How do I make dynamically created inputs in R/Shiny flow like normal inputs in flowLayout?How to make a great R reproducible exampleGet preferred size of multi-line flowlayoutHow can we make xkcd style graphs?Shiny renderUI selectInput returned NULLDynamically create interactive plots with shinyPrevent user input data from getting lost when adding another tabPanelUsing Shiny inputs inside a DataTable outputR Shiny: How to pass reactive variables between nested modulesDynamic filters and reactive plot in ShinyRemove button on each element dynamically added to a shiny UI

Area under the curve - Integrals (Antiderivatives)

How i can place a block anywhere in Store

Find hamming distance between two Strings of equal length in Java

How to cope with regret and shame about not fully utilizing opportunities during PhD?

Why is it harder to turn a motor/generator with shorted terminals?

Why do the lights go out when someone enters the dining room on this ship?

Labeling matrices/rectangles and drawing Sigma inside rectangle

Can I say that master can only initiate communication in SPI vs. in I2C slave can also initiate the communication?

Why does the headset man not get on the tractor?

How can a layman easily get the consensus view of what academia *thinks* about a subject?

On studying Computer Science vs. Software Engineering to become a proficient coder

Why do I get two different answers when solving for arclength?

Is 12 minutes connection in Bristol Temple Meads long enough?

What was the significance of Varys' little girl?

What to do if SUS scores contradict qualitative feedback?

Entering the UK as a British citizen who is a Canadian permanent resident

Would an 8% reduction in drag outweigh the weight addition from this custom CFD-tested winglet?

Is there any good reason to write "it is easy to see"?

Determine the slope and write the Cartesian equation of the line.

Can someone explain homicide-related death rates?

What kind of SATA connector is this?

German characters on US-International keyboard layout

How much Replacement does this axiom provide?

What is the best way for a skeleton to impersonate human without using magic?



How to make dynamically generated shiny UI elements 'flow'


How do I make dynamically created inputs in R/Shiny flow like normal inputs in flowLayout?How to make a great R reproducible exampleGet preferred size of multi-line flowlayoutHow can we make xkcd style graphs?Shiny renderUI selectInput returned NULLDynamically create interactive plots with shinyPrevent user input data from getting lost when adding another tabPanelUsing Shiny inputs inside a DataTable outputR Shiny: How to pass reactive variables between nested modulesDynamic filters and reactive plot in ShinyRemove button on each element dynamically added to a shiny UI






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















I am trying to dynamically generate shinyn UI elements placed horizontally one after another (left to right). The flowlayout seems perfect for it, however when the elements are dynamically generated using lapply it is being treated as a single element, and get placed vertically one below another.



Example code below



if (interactive()) 

ui <- flowLayout(
lapply(1:4,function(i)
selectInput(paste0("input_1",i),"input", choices=1:5)
)
)
shinyApp(ui, server = function(input, output) )



However when not generated dynamically they are placed horizontally(left to right) one after an other, which is what I am looking for. Any pointers as to how this can be fixed?



EDIT: I found this nice response to a similar problem here, but Im wondering if a non 'eval-parse' solution possible










share|improve this question






























    0















    I am trying to dynamically generate shinyn UI elements placed horizontally one after another (left to right). The flowlayout seems perfect for it, however when the elements are dynamically generated using lapply it is being treated as a single element, and get placed vertically one below another.



    Example code below



    if (interactive()) 

    ui <- flowLayout(
    lapply(1:4,function(i)
    selectInput(paste0("input_1",i),"input", choices=1:5)
    )
    )
    shinyApp(ui, server = function(input, output) )



    However when not generated dynamically they are placed horizontally(left to right) one after an other, which is what I am looking for. Any pointers as to how this can be fixed?



    EDIT: I found this nice response to a similar problem here, but Im wondering if a non 'eval-parse' solution possible










    share|improve this question


























      0












      0








      0








      I am trying to dynamically generate shinyn UI elements placed horizontally one after another (left to right). The flowlayout seems perfect for it, however when the elements are dynamically generated using lapply it is being treated as a single element, and get placed vertically one below another.



      Example code below



      if (interactive()) 

      ui <- flowLayout(
      lapply(1:4,function(i)
      selectInput(paste0("input_1",i),"input", choices=1:5)
      )
      )
      shinyApp(ui, server = function(input, output) )



      However when not generated dynamically they are placed horizontally(left to right) one after an other, which is what I am looking for. Any pointers as to how this can be fixed?



      EDIT: I found this nice response to a similar problem here, but Im wondering if a non 'eval-parse' solution possible










      share|improve this question
















      I am trying to dynamically generate shinyn UI elements placed horizontally one after another (left to right). The flowlayout seems perfect for it, however when the elements are dynamically generated using lapply it is being treated as a single element, and get placed vertically one below another.



      Example code below



      if (interactive()) 

      ui <- flowLayout(
      lapply(1:4,function(i)
      selectInput(paste0("input_1",i),"input", choices=1:5)
      )
      )
      shinyApp(ui, server = function(input, output) )



      However when not generated dynamically they are placed horizontally(left to right) one after an other, which is what I am looking for. Any pointers as to how this can be fixed?



      EDIT: I found this nice response to a similar problem here, but Im wondering if a non 'eval-parse' solution possible







      r shiny flowlayout






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 23 at 13:35







      ashleych

















      asked Mar 23 at 13:20









      ashleychashleych

      534313




      534313






















          1 Answer
          1






          active

          oldest

          votes


















          0














          library(shiny)

          ui <- fluidPage(
          do.call(flowLayout,
          lapply(1:4, function(i)
          selectInput(paste0("input_1",i), "input", choices=1:5)
          )
          )
          )

          shinyApp(ui, server = function(input, output) )





          share|improve this answer























          • While this works, could you help me out by explaining why one works and the other doesnt?

            – ashleych
            Mar 26 at 12:51











          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55314142%2fhow-to-make-dynamically-generated-shiny-ui-elements-flow%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          library(shiny)

          ui <- fluidPage(
          do.call(flowLayout,
          lapply(1:4, function(i)
          selectInput(paste0("input_1",i), "input", choices=1:5)
          )
          )
          )

          shinyApp(ui, server = function(input, output) )





          share|improve this answer























          • While this works, could you help me out by explaining why one works and the other doesnt?

            – ashleych
            Mar 26 at 12:51















          0














          library(shiny)

          ui <- fluidPage(
          do.call(flowLayout,
          lapply(1:4, function(i)
          selectInput(paste0("input_1",i), "input", choices=1:5)
          )
          )
          )

          shinyApp(ui, server = function(input, output) )





          share|improve this answer























          • While this works, could you help me out by explaining why one works and the other doesnt?

            – ashleych
            Mar 26 at 12:51













          0












          0








          0







          library(shiny)

          ui <- fluidPage(
          do.call(flowLayout,
          lapply(1:4, function(i)
          selectInput(paste0("input_1",i), "input", choices=1:5)
          )
          )
          )

          shinyApp(ui, server = function(input, output) )





          share|improve this answer













          library(shiny)

          ui <- fluidPage(
          do.call(flowLayout,
          lapply(1:4, function(i)
          selectInput(paste0("input_1",i), "input", choices=1:5)
          )
          )
          )

          shinyApp(ui, server = function(input, output) )






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 23 at 17:08









          Stéphane LaurentStéphane Laurent

          17.4k756100




          17.4k756100












          • While this works, could you help me out by explaining why one works and the other doesnt?

            – ashleych
            Mar 26 at 12:51

















          • While this works, could you help me out by explaining why one works and the other doesnt?

            – ashleych
            Mar 26 at 12:51
















          While this works, could you help me out by explaining why one works and the other doesnt?

          – ashleych
          Mar 26 at 12:51





          While this works, could you help me out by explaining why one works and the other doesnt?

          – ashleych
          Mar 26 at 12:51



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55314142%2fhow-to-make-dynamically-generated-shiny-ui-elements-flow%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

          은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현