select_input_world_countries function allows the user to select a country from the list select of countries. The choices for this country are a unique list of countries available from the already existing package of COVID19. You can download this package from the CRAN library and find out more about it select_input_world_countries, function accepts and stores the country of user choice. The user country can be stored in as a label in the selected_country_label, which is one of the argument of our function The user also will have to pass covid_data which is already been stored in the app.R for the second argument of this function
1 | select_input_world_countries(selected_country_label, covid_data)
|
selected_country_label |
defines a new label everytime this function runs and save it's value in the input_id of our select input function |
covid_data, |
this requires the function to pass the covid_data, which will help the function recognize other select input default parameters, in this case choices |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.