To build an application inside R, you need to understand how reactivity works. I'll explain it with an analogy using WhatsApp. Imagine your WhatsApp as the input object and you as the output object; any time a friend (the user) sends you a message, WhatsApp rings, alerting you about it, so you answer your friend with a new message based on what he/she wrote you. This is how reactive works in R's shiny package. Any time the user interacts and changes the value of an input, it alerts the server function that the output is outdated. So, the server function returns the code, pulling the new value inside the input$* variable, then returns the updated output.
It is important to know how it work mainly because there are situations where the server function can't rerun the code properly if a reactive expression isn't used. Reactive...