Hi All,
I am new to R and currently facing a roadblock. My data set has 4 columns (year , residential , commercial , industrial ).
The years are from 2016 - 2021, and I would like to know the code to find the mean of each year, separating it by residential, commercial and industrial.
Dataset
year residential commercial industrial
2016 9.43 8.48 6.93
2016 9.83 8.56 7.2
2016 10.3 8.63 8.49
2016 10.6 8.66 7.4
2016 11.0 8.79 7.36
2016 11.9 9.56 7.87
2016 12.1 9.56 8.51
2016 12.0 9.35 7.78
2016 12.3 9.44 7.48
2016 10.8 8.6 7.11