0

I have the sample dataframe as below,

enter image description here

Where for each date the total 'value' score is 1 as the 'varible' is proportion. Now how can I calculate the zoo:rollmean for 'value' based on dates considering 'variable'?

In the end I need to make areaplot using all mean variable values according to date as below.

enter image description here

I have tried group_by(variable) but it did not give the desired output

Thank you! Wasim

Wasim
  • 13
  • 2
  • Does the following answer inspire you https://stackoverflow.com/a/75382902/8806649? – Julien Feb 09 '23 at 12:37
  • 1
    Please read the information on asking questions at the top of the [tag:r] tag page. Note in particular that input should be provided in an easily reproducible form as the output of `dput` since no one wants to retype data in images. Also show the code attempt and the expected output. – G. Grothendieck Feb 09 '23 at 16:34

0 Answers0