structure(list(ticker = c("WMT", "WMT", "WMT", "WMT", "WMT",
"WMT"), filingdate = structure(c(18551, 18551, 18551, 18537,
18536, 18534), class = "Date"), formtype = c("4", "4", "4", "4",
"4", "4"), issuername = c("WALMART INC", "WALMART INC", "WALMART INC",
"WALMART INC", "WALMART INC", "WALMART INC"), ownername = c("LORE MARC E",
"LORE MARC E", "LORE MARC E", "BIGGS M BRETT", "LORE MARC E",
"WALTON ALICE L"), officertitle = c("Executive Vice President",
"Executive Vice President", "Executive Vice President", "Executive Vice President",
"Executive Vice President", NA), isdirector = c("N", "N", "N",
"N", "N", "N"), isofficer = c("Y", "Y", "Y", "Y", "Y", "N"),
istenpercentowner = c("N", "N", "N", "N", "N", "Y"), transactiondate = structure(c(18549,
18549, 18549, 18536, 18534, 18534), class = "Date"), securityadcode = c("ND",
"ND", "ND", "ND", "ND", "ND"), transactioncode = c("S", "S",
"S", "F", "F", "S"), sharesownedbeforetransaction = c(1669368,
1610399, 1591019, 302554, 1707160, 389404553), transactionshares = c(-58969,
-19380, -6651, -657, -37792, -606875), sharesownedfollowingtransaction = c(1610399,
1591019, 1584368, 301897, 1669368, 388797678), transactionpricepershare = c(144.114,
145.409, 145.891, 139.91, 137.25, 137.049), transactionvalue = c(8498258,
2818026, 970321, 91921, 5186952, 83171612), securitytitle = c("Common",
"Common", "Common", "Common Stock", "Common", "Common Stock"
), directorindirect = c("D", "D", "D", "D", "D", "I"), natureofownership = c(NA,
NA, NA, NA, NA, "By Trust"), dateexercisable = structure(c(NA_real_,
NA_real_, NA_real_, NA_real_, NA_real_, NA_real_), class = "Date"),
priceexercisable = c(NA_real_, NA_real_, NA_real_, NA_real_,
NA_real_, NA_real_), expirationdate = structure(c(NA_real_,
NA_real_, NA_real_, NA_real_, NA_real_, NA_real_), class = "Date"),
rownum = c(1, 2, 3, 1, 1, 2), mycolumn = c(-8498258, -2818026,
-970321, -91921, -5186952, -83171612)), row.names = c(1L,
2L, 3L, 9L, 13L, 15L), class = "data.frame")
I would like to compress my dataframe to sum all the values in the "my column" column for each day of the "filingdate" column. For example, the day 2020-10-16 is repeated 3 times. I would like the new data.frame to have a single row with the date 2020-10-16 and the "my column" column is the sum of its 3 values. All the other columns can be deleted or they can keep the value of the last day.
The same goes for all other dates