Relative Content

Tag Archive for dataframedatedatetimerstudiotemperature

Average and sum between two dates, from a daily data frame in r

I have a data frame with daily temperature data. I would like to calculate the average between two dates from a second data frame and add the results in a new column.
The average temperature must be calculated between the dates that are in the lines of data frame B.
Example:
average temperature between 02-15-2021 and 02-18-2021
average temperature between 02-18-2021 and 02-23-2021…