So, let's go through the code.
The code here has two parts because it was just hard to fit on the screen.
So, here's the first part, and then the second page is the second part.
So remember, of course, our shiny gadget has to have the UI part,
in this case we're again doing mini page.
And then the server part, okay?
And of course, we have to have
our two libraries loaded up so
just make sure, you have that, okay.
So, our gadget title is just going to be multiply to numbers
are a content panels so this is new right here.
Mini content panels so
that's just going to be main body of the little pane there, okay.
And it's going to have selector input, which is going to be like a drag down box,
and it's going to have two variables, the variable one is going to be labeled num1,
and num2, so if we have to reference them later, they're going to have that name.
And then these are the displayed labels and the choices are right here and
the choices come from this two arguments right here in the function, okay.
So, that's going to display our user-interface.
And then our server, okay.
Again, it's going to have input, output, and session.
We're still going to have the input$done.
Variable in the observe event, just to let Shiny know that when it's done to quit.
And then, we're going to remember to have this curly braces here.
Remember that kind of odd syntax that Shiny has.
So just probably the number one mistake everyone makes in coding Shiny
applications is forgetting to put the curly braces in, in the right spot or
forgetting to close a brace and that sort of thing.
Okay, so we're just going to actually name in this environment a num1 and
num2 as the just input values just so that there are easier to work with, okay.
And then we're going to multiply them together.
And the stopApp function is just going to tell it to stop and
display the result of num1 multiply times num2.
And remember we have to have a runGadget in there and
it specify what is the UI and what is the server.
So technically you could name UI and server something else.
But by convention I think no one does that.
Okay, so let's go to the code demonstration and see how it works.