I am using summarise to perform a calculation for each row of my data frame. Although the results are ok as shown in my console, I cant seem to be apple to insert them in the same data frame, or even create a new one. Any help? I am grouping them first based on a column (postcode) and then performing the calculation for all rows with the same postcode. Thank you in advance
 my_data %>%
   group_by(as.character(Postcode))%>%
   summarise(wgt_inw_PC = sum(E_W_GEM))

 
     
     
    