Without using a join or merge I would like to add a mean(metric)
column to this table, which averages the metric
by sector
symbol sector date_bom recommendation metric
A Strip Center 20XX-08-01 BUY 0.01
B Office Center 20XX-09-01 BUY 0.02
C Strip Center 20XX-07-01 SELL -0.01
I've tried a couple things in dplyr
but it seems like I want/need a group-by within the summarise clause, and that is not allowed.