I have a dataframe and I want to delete a single value based on the date and time, I want to delete the value for Variable 2 on the 2020-06-15 14:00:00 with an option to replace the value 780.45 with NA, or to leave it blank. I can find answers where the row is deleted based on the datetime but struggling to find where a single value is deleted.
df2 = structure(list(DateTime = structure(c(1592226000, 1592226900,
1592227800, 1592228700, 1592229600, 1592230500), class = c(“POSIXct”,
“POSIXt”), tzone = “UTC”), Variable1 = c(NA, 0.385999999999999,
0.193, 0.290000000000001, 0.385, 0.576000000000001), Variable2 = c(NA,
1005.87, 999.05, 1005.32, 780.45, 1100.44)), row.names = c(NA, 6L), class = “data.frame”)
Created on 2024-07-05 with reprex v2.1.0