Region Sum_as_Hours
1 Africa 1156.0833
2 Americas 740.1667
3 APAC 740.2833
4 Europe 1895.2000
5 PDO 1053.3500
6 UK 0.0000
mean_usage_hours_per_region<-setNames(aggregate(df3_machine_region$sum_as_hours~df3_machine_region$Region,df3_machine_region,mean),c("Region","Sum_as_Hours"))
Region Sum_as_Hours
1 Africa 1.7046559
2 Americas 0.7578695
3 APAC 7.5799541
4 Europe 4.9651339
5 PDO 8.2637964
6 UK 0.0000000
I want to have region as the input bar/field wrt both the above functions for which user can select options for which the data will be accordingly displayed.
Africa is just one of the values in the Region column like Americas.I have already selected Region column in the select input function under ui component.
right, so the code would fail also in a simple r script, (i.e. its not a shiny issue), but a how do I filter rows in and out of a table issue.
I recommend you learn to use a tidyverse approach, the book is excellent and you can rapidly be very productive.
You can head to chapter 5 (after installing the relevant packages - chapter 3.1.1 Prerequisites)