Sum app
- Generate an app template in RStudio (“New file” button)
- Modify the template to get an app which asks for two numbers (using numericInput) and returns its sum.
- Format the output with the sentence “The sum is” and the result. The number must be in bold (strong).
- Alongside with the previous output, show the result with verbatimTextOutput to see the difference.
- Add a submitButton and see its effect on the app reactive behaviour.
Regression app
- Download the app “regressio_inicial” from https://github.com/pere-prlpz/classe_shiny
- Test it: it’s a very simple app to graphically show to students what is correlation.
- Set the default value of sample size to a larger value (anything from 100 to 1000 could be fine).
- Modify “r” numericInput to a slideInput to allow correlation from -1 to +1. Choose a suitable step.
- Show the regression summary of the depicted scatterplot. Hint: You will need to store the points and the model in a dedicated reactive object since it will be used by two differnt outputs.
- The random part of the data distribution changes when any input changes. Make it change only when sample size changes.
- Use the “animate” parameter in sliderInput to creat an animation.
- Create tabs in the layout. First one will host the current graphic and summary, second one graphics, and third one numerical sumaries. You may want to add a fourth tab for credits.
- Show the same scatterplot in first and second tab and the same regression summary in first and third tabs. Hint: Shiny doesn’t like to render twice the same output.
- Add graphical summaries (e.g. histogram) of X and y to second tab and numerical summaries (e.g. summary) to third tab.
Scoreboard
- Create an scoreboard app with buttons for adding local and visitor goals and to reset scoreboard.
- Make the app keep a table of goals with team and time.
- Add a button to download the table.
- Optional: add controls to make corrections on the score.
Clicable graph (optional)
- Create an app with a blank graphic
- Make the graphic clicable and store coordinates of clicks
- Show an scatterplot and correlation of clicks