Hi I am trying to learn to use FRED Data to convert monthly and quarterly into annual data. My data looks like this:
Date FEDFUNDS
7/1/2000 6.54
8/1/2000 6.5
9/1/2000 6.52
10/1/2000 6.51
11/1/2000 6.51
12/1/2000 6.4
Previously, seeing other posts I tried using the following to convert monthly to quarterly.
library(tidyverse)
data<- read_csv(file.choose())
head(data)
data$Date=as.Date(data$Date, formate="$m/$d/%y")
data<-arrange(data,Date)
library(zoo)
data$qdate<-as.yearqtr(data$Date)
library(date)
data_qrtly<-data %>%
group_by(qdate) %>%
summarise_all(mean)
But I'm having difficult in trying the "DF" in converting monthly or quarterly to yearly data. Any help will be very appreciated.