I am using top_n function to find out top 10 machines based on usage hours per month,region and server but i am getting the usage hours truncated(no values after decimal,only the value before decimal and decimal point).
The sum_of_hours column is numeric in the dataframe.
top_10_by_month_region_server<-df3_machine_region%>%group_by(Month,Region,Server)%>%ungroup()%>%top_n(10,df3_machine_region$sum_as_hours)
top_10_by_month_region_server_sort<-top_10_by_month_region_server%>%arrange(desc(top_10_by_month_region_server$sum_as_hours))
Machine.Name Region Month Year Server sum_as_hours
1 AMS-L-94741.europe.shell.com Europe July 2020 AMSDC-1-S-90588 1895.
2 AMS-L-95267.europe.shell.com Europe August 2020 AMSDC-1-S-90588 1471.
3 PHC-D-91943.africa-me.shell.com Africa January 2020 AMSDC-1-S-90588 1156.
4 SERHO-L-84510.asia-pac.shell.com APAC July 2020 PEJJBT-S-8008 734.
5 SERHO-L-91604.asia-pac.shell.com APAC August 2020 PEJJBT-S-8008 740.
6 STCB-L-97240.asia-pac.shell.com APAC August 2020 PEJJBT-S-8008 740.
7 STCB-L-97779.asia-pac.shell.com APAC August 2020 PEJJBT-S-8008 740.
8 W180402.corp.pdo.om PDO July 2020 AMSDC-1-S-90588 951.
9 W180402.corp.pdo.om PDO August 2020 AMSDC-1-S-90588 1053.
10 WDLVMMPLDS1.d2kbinz.local Americas August 2020 HOUCY1-S-07400 740.