In the attached image I would like to create and add the c variable rows rto the dataframe. Row c is row a - row b (by date etc). Have tried using dplyr but not getting there....
variable <- c(a,b,a,b)
date <- c(jan 22,jan 22, feb 22,feb 22)
amount <- c(100,20,100,20)
DF:
variable date amount
-------- ---- ------
a Jan 22 100
b Jan 22 20
c Jan 22 80
a Jan 22 100
b Jan 22 20
c Jan 22 80