Two graphs side by side within main panel

1,962 views
Skip to first unread message

Ankit Dsouza

unread,
Feb 15, 2013, 12:03:46 PM2/15/13
to shiny-...@googlegroups.com
I am trying to plot two graphs side by side within main panel.

ui.R
:
......
mainPanel(
div(class="span6",plotOutput(outputId= "myPlot1"))
div(class="span6",plotOutput(outputId= "myPlot2"))
)
......

Both the reactive functions myPlot1 and myPlot2 are triggered by the same input variable.

I am getting this error:

Error in if (width <= 0 || height <= 0) return(NULL) : 
  missing value where TRUE/FALSE needed
Error in source(filePath, local = new.env(parent = .GlobalEnv)) : 
  D:/STUDY files/ProjBE/shinyapp/ui.R:18:9: unexpected symbol
17:         div(class="span6",plotOutput(outputId= "myPlot1"))
18:         div

Winston Chang

unread,
Feb 15, 2013, 1:17:57 PM2/15/13
to shiny-...@googlegroups.com
Hi Ankit -

You need a comma between the two calls to div().

-Winston


--
You received this message because you are subscribed to the Google Groups "Shiny - Web Framework for R" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shiny-discus...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages